deploy: 5c80e220805ca20397658c0cbe0c9160aae33fad
[project/luci.git] / jsapi / network.js.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Source: network.js</title>
6
7
8 <script src="scripts/prettify/prettify.js"></script>
9 <script src="scripts/prettify/lang-css.js"></script>
10 <script src="scripts/jquery.min.js"></script>
11 <!--[if lt IE 9]>
12 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13 <![endif]-->
14 <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15 <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
16 <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
17
18
19 <script>
20 var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":true}};
21 </script>
22
23
24
25 </head>
26 <body>
27 <div id="wrap" class="clearfix">
28
29 <div class="navigation">
30 <h3 class="applicationName"><a href="index.html"></a></h3>
31
32 <div class="search">
33 <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
34 </div>
35 <ul class="list">
36
37 <li class="item" data-name="LuCI">
38 <span class="title">
39 <a href="LuCI.html">LuCI</a>
40
41 </span>
42 <ul class="members itemMembers">
43
44 <span class="subtitle">Members</span>
45
46 <li data-name="LuCI#Class"><a href="LuCI.html#Class">Class</a></li>
47
48 <li data-name="LuCI#dom"><a href="LuCI.html#dom">dom</a></li>
49
50 <li data-name="LuCI#env"><a href="LuCI.html#env">env</a></li>
51
52 <li data-name="LuCI#naturalCompare"><a href="LuCI.html#naturalCompare">naturalCompare</a></li>
53
54 <li data-name="LuCI#Poll"><a href="LuCI.html#Poll">Poll</a></li>
55
56 <li data-name="LuCI#Request"><a href="LuCI.html#Request">Request</a></li>
57
58 <li data-name="LuCI#view"><a href="LuCI.html#view">view</a></li>
59
60 </ul>
61 <ul class="typedefs itemMembers">
62
63 <span class="subtitle">Typedefs</span>
64
65 <li data-name="LuCI.requestCallbackFn"><a href="LuCI.html#.requestCallbackFn">requestCallbackFn</a></li>
66
67 </ul>
68 <ul class="typedefs itemMembers">
69
70 </ul>
71 <ul class="methods itemMembers">
72
73 <span class="subtitle">Methods</span>
74
75 <li data-name="LuCI#bind"><a href="LuCI.html#bind">bind</a></li>
76
77 <li data-name="LuCI#error"><a href="LuCI.html#error">error</a></li>
78
79 <li data-name="LuCI#fspath"><a href="LuCI.html#fspath">fspath</a></li>
80
81 <li data-name="LuCI#get"><a href="LuCI.html#get">get</a></li>
82
83 <li data-name="LuCI#halt"><a href="LuCI.html#halt">halt</a></li>
84
85 <li data-name="LuCI#hasSystemFeature"><a href="LuCI.html#hasSystemFeature">hasSystemFeature</a></li>
86
87 <li data-name="LuCI#hasViewPermission"><a href="LuCI.html#hasViewPermission">hasViewPermission</a></li>
88
89 <li data-name="LuCI#isObject"><a href="LuCI.html#isObject">isObject</a></li>
90
91 <li data-name="LuCI#location"><a href="LuCI.html#location">location</a></li>
92
93 <li data-name="LuCI#media"><a href="LuCI.html#media">media</a></li>
94
95 <li data-name="LuCI#path"><a href="LuCI.html#path">path</a></li>
96
97 <li data-name="LuCI#poll"><a href="LuCI.html#poll">poll</a></li>
98
99 <li data-name="LuCI#post"><a href="LuCI.html#post">post</a></li>
100
101 <li data-name="LuCI#raise"><a href="LuCI.html#raise">raise</a></li>
102
103 <li data-name="LuCI#require"><a href="LuCI.html#require">require</a></li>
104
105 <li data-name="LuCI#resolveDefault"><a href="LuCI.html#resolveDefault">resolveDefault</a></li>
106
107 <li data-name="LuCI#resource"><a href="LuCI.html#resource">resource</a></li>
108
109 <li data-name="LuCI#run"><a href="LuCI.html#run">run</a></li>
110
111 <li data-name="LuCI#sortedArray"><a href="LuCI.html#sortedArray">sortedArray</a></li>
112
113 <li data-name="LuCI#sortedKeys"><a href="LuCI.html#sortedKeys">sortedKeys</a></li>
114
115 <li data-name="LuCI#stop"><a href="LuCI.html#stop">stop</a></li>
116
117 <li data-name="LuCI#toArray"><a href="LuCI.html#toArray">toArray</a></li>
118
119 <li data-name="LuCI#url"><a href="LuCI.html#url">url</a></li>
120
121 </ul>
122 <ul class="events itemMembers">
123
124 </ul>
125 </li>
126
127 <li class="item" data-name="LuCI.baseclass">
128 <span class="title">
129 <a href="LuCI.baseclass.html">LuCI.baseclass</a>
130
131 </span>
132 <ul class="members itemMembers">
133
134 </ul>
135 <ul class="typedefs itemMembers">
136
137 </ul>
138 <ul class="typedefs itemMembers">
139
140 </ul>
141 <ul class="methods itemMembers">
142
143 <span class="subtitle">Methods</span>
144
145 <li data-name="LuCI.baseclass.extend"><a href="LuCI.baseclass.html#.extend">extend</a></li>
146
147 <li data-name="LuCI.baseclass.instantiate"><a href="LuCI.baseclass.html#.instantiate">instantiate</a></li>
148
149 <li data-name="LuCI.baseclass.isSubclass"><a href="LuCI.baseclass.html#.isSubclass">isSubclass</a></li>
150
151 <li data-name="LuCI.baseclass.singleton"><a href="LuCI.baseclass.html#.singleton">singleton</a></li>
152
153 <li data-name="LuCI.baseclass#super"><a href="LuCI.baseclass.html#super">super</a></li>
154
155 <li data-name="LuCI.baseclass#varargs"><a href="LuCI.baseclass.html#varargs">varargs</a></li>
156
157 </ul>
158 <ul class="events itemMembers">
159
160 </ul>
161 </li>
162
163 <li class="item" data-name="LuCI.dom">
164 <span class="title">
165 <a href="LuCI.dom.html">LuCI.dom</a>
166
167 </span>
168 <ul class="members itemMembers">
169
170 </ul>
171 <ul class="typedefs itemMembers">
172
173 <span class="subtitle">Typedefs</span>
174
175 <li data-name="LuCI.dom~ignoreCallbackFn"><a href="LuCI.dom.html#~ignoreCallbackFn">ignoreCallbackFn</a></li>
176
177 </ul>
178 <ul class="typedefs itemMembers">
179
180 </ul>
181 <ul class="methods itemMembers">
182
183 <span class="subtitle">Methods</span>
184
185 <li data-name="LuCI.dom#append"><a href="LuCI.dom.html#append">append</a></li>
186
187 <li data-name="LuCI.dom#attr"><a href="LuCI.dom.html#attr">attr</a></li>
188
189 <li data-name="LuCI.dom#bindClassInstance"><a href="LuCI.dom.html#bindClassInstance">bindClassInstance</a></li>
190
191 <li data-name="LuCI.dom#callClassMethod"><a href="LuCI.dom.html#callClassMethod">callClassMethod</a></li>
192
193 <li data-name="LuCI.dom#content"><a href="LuCI.dom.html#content">content</a></li>
194
195 <li data-name="LuCI.dom#create"><a href="LuCI.dom.html#create">create</a></li>
196
197 <li data-name="LuCI.dom#data"><a href="LuCI.dom.html#data">data</a></li>
198
199 <li data-name="LuCI.dom#elem"><a href="LuCI.dom.html#elem">elem</a></li>
200
201 <li data-name="LuCI.dom#findClassInstance"><a href="LuCI.dom.html#findClassInstance">findClassInstance</a></li>
202
203 <li data-name="LuCI.dom#isEmpty"><a href="LuCI.dom.html#isEmpty">isEmpty</a></li>
204
205 <li data-name="LuCI.dom#matches"><a href="LuCI.dom.html#matches">matches</a></li>
206
207 <li data-name="LuCI.dom#parent"><a href="LuCI.dom.html#parent">parent</a></li>
208
209 <li data-name="LuCI.dom#parse"><a href="LuCI.dom.html#parse">parse</a></li>
210
211 </ul>
212 <ul class="events itemMembers">
213
214 </ul>
215 </li>
216
217 <li class="item" data-name="LuCI.form">
218 <span class="title">
219 <a href="LuCI.form.html">LuCI.form</a>
220
221 </span>
222 <ul class="members itemMembers">
223
224 </ul>
225 <ul class="typedefs itemMembers">
226
227 </ul>
228 <ul class="typedefs itemMembers">
229
230 </ul>
231 <ul class="methods itemMembers">
232
233 </ul>
234 <ul class="events itemMembers">
235
236 </ul>
237 </li>
238
239 <li class="item" data-name="LuCI.form.AbstractElement">
240 <span class="title">
241 <a href="LuCI.form.AbstractElement.html">LuCI.form.AbstractElement</a>
242
243 </span>
244 <ul class="members itemMembers">
245
246 </ul>
247 <ul class="typedefs itemMembers">
248
249 </ul>
250 <ul class="typedefs itemMembers">
251
252 </ul>
253 <ul class="methods itemMembers">
254
255 <span class="subtitle">Methods</span>
256
257 <li data-name="LuCI.form.AbstractElement#append"><a href="LuCI.form.AbstractElement.html#append">append</a></li>
258
259 <li data-name="LuCI.form.AbstractElement#parse"><a href="LuCI.form.AbstractElement.html#parse">parse</a></li>
260
261 <li data-name="LuCI.form.AbstractElement#render"><a href="LuCI.form.AbstractElement.html#render">render</a></li>
262
263 <li data-name="LuCI.form.AbstractElement#stripTags"><a href="LuCI.form.AbstractElement.html#stripTags">stripTags</a></li>
264
265 <li data-name="LuCI.form.AbstractElement#titleFn"><a href="LuCI.form.AbstractElement.html#titleFn">titleFn</a></li>
266
267 </ul>
268 <ul class="events itemMembers">
269
270 </ul>
271 </li>
272
273 <li class="item" data-name="LuCI.form.AbstractSection">
274 <span class="title">
275 <a href="LuCI.form.AbstractSection.html">LuCI.form.AbstractSection</a>
276
277 </span>
278 <ul class="members itemMembers">
279
280 <span class="subtitle">Members</span>
281
282 <li data-name="LuCI.form.AbstractSection##parentoption"><a href="LuCI.form.AbstractSection.html#parentoption">parentoption</a></li>
283
284 </ul>
285 <ul class="typedefs itemMembers">
286
287 </ul>
288 <ul class="typedefs itemMembers">
289
290 </ul>
291 <ul class="methods itemMembers">
292
293 <span class="subtitle">Methods</span>
294
295 <li data-name="LuCI.form.AbstractSection#append"><a href="LuCI.form.AbstractSection.html#append">append</a></li>
296
297 <li data-name="LuCI.form.AbstractSection#cfgsections"><a href="LuCI.form.AbstractSection.html#cfgsections">cfgsections</a></li>
298
299 <li data-name="LuCI.form.AbstractSection#cfgvalue"><a href="LuCI.form.AbstractSection.html#cfgvalue">cfgvalue</a></li>
300
301 <li data-name="LuCI.form.AbstractSection#filter"><a href="LuCI.form.AbstractSection.html#filter">filter</a></li>
302
303 <li data-name="LuCI.form.AbstractSection#formvalue"><a href="LuCI.form.AbstractSection.html#formvalue">formvalue</a></li>
304
305 <li data-name="LuCI.form.AbstractSection#getOption"><a href="LuCI.form.AbstractSection.html#getOption">getOption</a></li>
306
307 <li data-name="LuCI.form.AbstractSection#getUIElement"><a href="LuCI.form.AbstractSection.html#getUIElement">getUIElement</a></li>
308
309 <li data-name="LuCI.form.AbstractSection#load"><a href="LuCI.form.AbstractSection.html#load">load</a></li>
310
311 <li data-name="LuCI.form.AbstractSection#option"><a href="LuCI.form.AbstractSection.html#option">option</a></li>
312
313 <li data-name="LuCI.form.AbstractSection#parse"><a href="LuCI.form.AbstractSection.html#parse">parse</a></li>
314
315 <li data-name="LuCI.form.AbstractSection#render"><a href="LuCI.form.AbstractSection.html#render">render</a></li>
316
317 <li data-name="LuCI.form.AbstractSection#stripTags"><a href="LuCI.form.AbstractSection.html#stripTags">stripTags</a></li>
318
319 <li data-name="LuCI.form.AbstractSection#tab"><a href="LuCI.form.AbstractSection.html#tab">tab</a></li>
320
321 <li data-name="LuCI.form.AbstractSection#taboption"><a href="LuCI.form.AbstractSection.html#taboption">taboption</a></li>
322
323 <li data-name="LuCI.form.AbstractSection#titleFn"><a href="LuCI.form.AbstractSection.html#titleFn">titleFn</a></li>
324
325 </ul>
326 <ul class="events itemMembers">
327
328 </ul>
329 </li>
330
331 <li class="item" data-name="LuCI.form.AbstractValue">
332 <span class="title">
333 <a href="LuCI.form.AbstractValue.html">LuCI.form.AbstractValue</a>
334
335 </span>
336 <ul class="members itemMembers">
337
338 <span class="subtitle">Members</span>
339
340 <li data-name="LuCI.form.AbstractValue##datatype"><a href="LuCI.form.AbstractValue.html#datatype">datatype</a></li>
341
342 <li data-name="LuCI.form.AbstractValue##default"><a href="LuCI.form.AbstractValue.html#default">default</a></li>
343
344 <li data-name="LuCI.form.AbstractValue##editable"><a href="LuCI.form.AbstractValue.html#editable">editable</a></li>
345
346 <li data-name="LuCI.form.AbstractValue##modalonly"><a href="LuCI.form.AbstractValue.html#modalonly">modalonly</a></li>
347
348 <li data-name="LuCI.form.AbstractValue##onchange"><a href="LuCI.form.AbstractValue.html#onchange">onchange</a></li>
349
350 <li data-name="LuCI.form.AbstractValue##optional"><a href="LuCI.form.AbstractValue.html#optional">optional</a></li>
351
352 <li data-name="LuCI.form.AbstractValue##readonly"><a href="LuCI.form.AbstractValue.html#readonly">readonly</a></li>
353
354 <li data-name="LuCI.form.AbstractValue##retain"><a href="LuCI.form.AbstractValue.html#retain">retain</a></li>
355
356 <li data-name="LuCI.form.AbstractValue##rmempty"><a href="LuCI.form.AbstractValue.html#rmempty">rmempty</a></li>
357
358 <li data-name="LuCI.form.AbstractValue##uciconfig"><a href="LuCI.form.AbstractValue.html#uciconfig">uciconfig</a></li>
359
360 <li data-name="LuCI.form.AbstractValue##ucioption"><a href="LuCI.form.AbstractValue.html#ucioption">ucioption</a></li>
361
362 <li data-name="LuCI.form.AbstractValue##ucisection"><a href="LuCI.form.AbstractValue.html#ucisection">ucisection</a></li>
363
364 <li data-name="LuCI.form.AbstractValue##validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
365
366 <li data-name="LuCI.form.AbstractValue##width"><a href="LuCI.form.AbstractValue.html#width">width</a></li>
367
368 </ul>
369 <ul class="typedefs itemMembers">
370
371 </ul>
372 <ul class="typedefs itemMembers">
373
374 </ul>
375 <ul class="methods itemMembers">
376
377 <span class="subtitle">Methods</span>
378
379 <li data-name="LuCI.form.AbstractValue#append"><a href="LuCI.form.AbstractValue.html#append">append</a></li>
380
381 <li data-name="LuCI.form.AbstractValue#cbid"><a href="LuCI.form.AbstractValue.html#cbid">cbid</a></li>
382
383 <li data-name="LuCI.form.AbstractValue#cfgvalue"><a href="LuCI.form.AbstractValue.html#cfgvalue">cfgvalue</a></li>
384
385 <li data-name="LuCI.form.AbstractValue#depends"><a href="LuCI.form.AbstractValue.html#depends">depends</a></li>
386
387 <li data-name="LuCI.form.AbstractValue#formvalue"><a href="LuCI.form.AbstractValue.html#formvalue">formvalue</a></li>
388
389 <li data-name="LuCI.form.AbstractValue#getUIElement"><a href="LuCI.form.AbstractValue.html#getUIElement">getUIElement</a></li>
390
391 <li data-name="LuCI.form.AbstractValue#getValidationError"><a href="LuCI.form.AbstractValue.html#getValidationError">getValidationError</a></li>
392
393 <li data-name="LuCI.form.AbstractValue#isActive"><a href="LuCI.form.AbstractValue.html#isActive">isActive</a></li>
394
395 <li data-name="LuCI.form.AbstractValue#isValid"><a href="LuCI.form.AbstractValue.html#isValid">isValid</a></li>
396
397 <li data-name="LuCI.form.AbstractValue#load"><a href="LuCI.form.AbstractValue.html#load">load</a></li>
398
399 <li data-name="LuCI.form.AbstractValue#parse"><a href="LuCI.form.AbstractValue.html#parse">parse</a></li>
400
401 <li data-name="LuCI.form.AbstractValue#remove"><a href="LuCI.form.AbstractValue.html#remove">remove</a></li>
402
403 <li data-name="LuCI.form.AbstractValue#render"><a href="LuCI.form.AbstractValue.html#render">render</a></li>
404
405 <li data-name="LuCI.form.AbstractValue#stripTags"><a href="LuCI.form.AbstractValue.html#stripTags">stripTags</a></li>
406
407 <li data-name="LuCI.form.AbstractValue#textvalue"><a href="LuCI.form.AbstractValue.html#textvalue">textvalue</a></li>
408
409 <li data-name="LuCI.form.AbstractValue#titleFn"><a href="LuCI.form.AbstractValue.html#titleFn">titleFn</a></li>
410
411 <li data-name="LuCI.form.AbstractValue#validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
412
413 <li data-name="LuCI.form.AbstractValue#write"><a href="LuCI.form.AbstractValue.html#write">write</a></li>
414
415 </ul>
416 <ul class="events itemMembers">
417
418 </ul>
419 </li>
420
421 <li class="item" data-name="LuCI.form.ButtonValue">
422 <span class="title">
423 <a href="LuCI.form.ButtonValue.html">LuCI.form.ButtonValue</a>
424
425 </span>
426 <ul class="members itemMembers">
427
428 <span class="subtitle">Members</span>
429
430 <li data-name="LuCI.form.ButtonValue##inputstyle"><a href="LuCI.form.ButtonValue.html#inputstyle">inputstyle</a></li>
431
432 <li data-name="LuCI.form.ButtonValue##inputtitle"><a href="LuCI.form.ButtonValue.html#inputtitle">inputtitle</a></li>
433
434 <li data-name="LuCI.form.ButtonValue##onclick"><a href="LuCI.form.ButtonValue.html#onclick">onclick</a></li>
435
436 <li data-name="LuCI.form.ButtonValue#datatype"><a href="LuCI.form.ButtonValue.html#datatype">datatype</a></li>
437
438 <li data-name="LuCI.form.ButtonValue#default"><a href="LuCI.form.ButtonValue.html#default">default</a></li>
439
440 <li data-name="LuCI.form.ButtonValue#editable"><a href="LuCI.form.ButtonValue.html#editable">editable</a></li>
441
442 <li data-name="LuCI.form.ButtonValue#modalonly"><a href="LuCI.form.ButtonValue.html#modalonly">modalonly</a></li>
443
444 <li data-name="LuCI.form.ButtonValue#onchange"><a href="LuCI.form.ButtonValue.html#onchange">onchange</a></li>
445
446 <li data-name="LuCI.form.ButtonValue#optional"><a href="LuCI.form.ButtonValue.html#optional">optional</a></li>
447
448 <li data-name="LuCI.form.ButtonValue#password"><a href="LuCI.form.ButtonValue.html#password">password</a></li>
449
450 <li data-name="LuCI.form.ButtonValue#placeholder"><a href="LuCI.form.ButtonValue.html#placeholder">placeholder</a></li>
451
452 <li data-name="LuCI.form.ButtonValue#readonly"><a href="LuCI.form.ButtonValue.html#readonly">readonly</a></li>
453
454 <li data-name="LuCI.form.ButtonValue#retain"><a href="LuCI.form.ButtonValue.html#retain">retain</a></li>
455
456 <li data-name="LuCI.form.ButtonValue#rmempty"><a href="LuCI.form.ButtonValue.html#rmempty">rmempty</a></li>
457
458 <li data-name="LuCI.form.ButtonValue#uciconfig"><a href="LuCI.form.ButtonValue.html#uciconfig">uciconfig</a></li>
459
460 <li data-name="LuCI.form.ButtonValue#ucioption"><a href="LuCI.form.ButtonValue.html#ucioption">ucioption</a></li>
461
462 <li data-name="LuCI.form.ButtonValue#ucisection"><a href="LuCI.form.ButtonValue.html#ucisection">ucisection</a></li>
463
464 <li data-name="LuCI.form.ButtonValue#validate"><a href="LuCI.form.ButtonValue.html#validate">validate</a></li>
465
466 <li data-name="LuCI.form.ButtonValue#width"><a href="LuCI.form.ButtonValue.html#width">width</a></li>
467
468 </ul>
469 <ul class="typedefs itemMembers">
470
471 </ul>
472 <ul class="typedefs itemMembers">
473
474 </ul>
475 <ul class="methods itemMembers">
476
477 <span class="subtitle">Methods</span>
478
479 <li data-name="LuCI.form.ButtonValue#append"><a href="LuCI.form.ButtonValue.html#append">append</a></li>
480
481 <li data-name="LuCI.form.ButtonValue#cbid"><a href="LuCI.form.ButtonValue.html#cbid">cbid</a></li>
482
483 <li data-name="LuCI.form.ButtonValue#cfgvalue"><a href="LuCI.form.ButtonValue.html#cfgvalue">cfgvalue</a></li>
484
485 <li data-name="LuCI.form.ButtonValue#depends"><a href="LuCI.form.ButtonValue.html#depends">depends</a></li>
486
487 <li data-name="LuCI.form.ButtonValue#formvalue"><a href="LuCI.form.ButtonValue.html#formvalue">formvalue</a></li>
488
489 <li data-name="LuCI.form.ButtonValue#getUIElement"><a href="LuCI.form.ButtonValue.html#getUIElement">getUIElement</a></li>
490
491 <li data-name="LuCI.form.ButtonValue#getValidationError"><a href="LuCI.form.ButtonValue.html#getValidationError">getValidationError</a></li>
492
493 <li data-name="LuCI.form.ButtonValue#isActive"><a href="LuCI.form.ButtonValue.html#isActive">isActive</a></li>
494
495 <li data-name="LuCI.form.ButtonValue#isValid"><a href="LuCI.form.ButtonValue.html#isValid">isValid</a></li>
496
497 <li data-name="LuCI.form.ButtonValue#load"><a href="LuCI.form.ButtonValue.html#load">load</a></li>
498
499 <li data-name="LuCI.form.ButtonValue#parse"><a href="LuCI.form.ButtonValue.html#parse">parse</a></li>
500
501 <li data-name="LuCI.form.ButtonValue#remove"><a href="LuCI.form.ButtonValue.html#remove">remove</a></li>
502
503 <li data-name="LuCI.form.ButtonValue#stripTags"><a href="LuCI.form.ButtonValue.html#stripTags">stripTags</a></li>
504
505 <li data-name="LuCI.form.ButtonValue#textvalue"><a href="LuCI.form.ButtonValue.html#textvalue">textvalue</a></li>
506
507 <li data-name="LuCI.form.ButtonValue#titleFn"><a href="LuCI.form.ButtonValue.html#titleFn">titleFn</a></li>
508
509 <li data-name="LuCI.form.ButtonValue#value"><a href="LuCI.form.ButtonValue.html#value">value</a></li>
510
511 <li data-name="LuCI.form.ButtonValue#write"><a href="LuCI.form.ButtonValue.html#write">write</a></li>
512
513 </ul>
514 <ul class="events itemMembers">
515
516 </ul>
517 </li>
518
519 <li class="item" data-name="LuCI.form.DummyValue">
520 <span class="title">
521 <a href="LuCI.form.DummyValue.html">LuCI.form.DummyValue</a>
522
523 </span>
524 <ul class="members itemMembers">
525
526 <span class="subtitle">Members</span>
527
528 <li data-name="LuCI.form.DummyValue##hidden"><a href="LuCI.form.DummyValue.html#hidden">hidden</a></li>
529
530 <li data-name="LuCI.form.DummyValue##href"><a href="LuCI.form.DummyValue.html#href">href</a></li>
531
532 <li data-name="LuCI.form.DummyValue##rawhtml"><a href="LuCI.form.DummyValue.html#rawhtml">rawhtml</a></li>
533
534 <li data-name="LuCI.form.DummyValue#datatype"><a href="LuCI.form.DummyValue.html#datatype">datatype</a></li>
535
536 <li data-name="LuCI.form.DummyValue#default"><a href="LuCI.form.DummyValue.html#default">default</a></li>
537
538 <li data-name="LuCI.form.DummyValue#editable"><a href="LuCI.form.DummyValue.html#editable">editable</a></li>
539
540 <li data-name="LuCI.form.DummyValue#modalonly"><a href="LuCI.form.DummyValue.html#modalonly">modalonly</a></li>
541
542 <li data-name="LuCI.form.DummyValue#onchange"><a href="LuCI.form.DummyValue.html#onchange">onchange</a></li>
543
544 <li data-name="LuCI.form.DummyValue#optional"><a href="LuCI.form.DummyValue.html#optional">optional</a></li>
545
546 <li data-name="LuCI.form.DummyValue#password"><a href="LuCI.form.DummyValue.html#password">password</a></li>
547
548 <li data-name="LuCI.form.DummyValue#placeholder"><a href="LuCI.form.DummyValue.html#placeholder">placeholder</a></li>
549
550 <li data-name="LuCI.form.DummyValue#readonly"><a href="LuCI.form.DummyValue.html#readonly">readonly</a></li>
551
552 <li data-name="LuCI.form.DummyValue#retain"><a href="LuCI.form.DummyValue.html#retain">retain</a></li>
553
554 <li data-name="LuCI.form.DummyValue#rmempty"><a href="LuCI.form.DummyValue.html#rmempty">rmempty</a></li>
555
556 <li data-name="LuCI.form.DummyValue#uciconfig"><a href="LuCI.form.DummyValue.html#uciconfig">uciconfig</a></li>
557
558 <li data-name="LuCI.form.DummyValue#ucioption"><a href="LuCI.form.DummyValue.html#ucioption">ucioption</a></li>
559
560 <li data-name="LuCI.form.DummyValue#ucisection"><a href="LuCI.form.DummyValue.html#ucisection">ucisection</a></li>
561
562 <li data-name="LuCI.form.DummyValue#validate"><a href="LuCI.form.DummyValue.html#validate">validate</a></li>
563
564 <li data-name="LuCI.form.DummyValue#width"><a href="LuCI.form.DummyValue.html#width">width</a></li>
565
566 </ul>
567 <ul class="typedefs itemMembers">
568
569 </ul>
570 <ul class="typedefs itemMembers">
571
572 </ul>
573 <ul class="methods itemMembers">
574
575 <span class="subtitle">Methods</span>
576
577 <li data-name="LuCI.form.DummyValue#append"><a href="LuCI.form.DummyValue.html#append">append</a></li>
578
579 <li data-name="LuCI.form.DummyValue#cbid"><a href="LuCI.form.DummyValue.html#cbid">cbid</a></li>
580
581 <li data-name="LuCI.form.DummyValue#cfgvalue"><a href="LuCI.form.DummyValue.html#cfgvalue">cfgvalue</a></li>
582
583 <li data-name="LuCI.form.DummyValue#depends"><a href="LuCI.form.DummyValue.html#depends">depends</a></li>
584
585 <li data-name="LuCI.form.DummyValue#formvalue"><a href="LuCI.form.DummyValue.html#formvalue">formvalue</a></li>
586
587 <li data-name="LuCI.form.DummyValue#getUIElement"><a href="LuCI.form.DummyValue.html#getUIElement">getUIElement</a></li>
588
589 <li data-name="LuCI.form.DummyValue#getValidationError"><a href="LuCI.form.DummyValue.html#getValidationError">getValidationError</a></li>
590
591 <li data-name="LuCI.form.DummyValue#isActive"><a href="LuCI.form.DummyValue.html#isActive">isActive</a></li>
592
593 <li data-name="LuCI.form.DummyValue#isValid"><a href="LuCI.form.DummyValue.html#isValid">isValid</a></li>
594
595 <li data-name="LuCI.form.DummyValue#load"><a href="LuCI.form.DummyValue.html#load">load</a></li>
596
597 <li data-name="LuCI.form.DummyValue#parse"><a href="LuCI.form.DummyValue.html#parse">parse</a></li>
598
599 <li data-name="LuCI.form.DummyValue#remove"><a href="LuCI.form.DummyValue.html#remove">remove</a></li>
600
601 <li data-name="LuCI.form.DummyValue#stripTags"><a href="LuCI.form.DummyValue.html#stripTags">stripTags</a></li>
602
603 <li data-name="LuCI.form.DummyValue#textvalue"><a href="LuCI.form.DummyValue.html#textvalue">textvalue</a></li>
604
605 <li data-name="LuCI.form.DummyValue#titleFn"><a href="LuCI.form.DummyValue.html#titleFn">titleFn</a></li>
606
607 <li data-name="LuCI.form.DummyValue#value"><a href="LuCI.form.DummyValue.html#value">value</a></li>
608
609 <li data-name="LuCI.form.DummyValue#write"><a href="LuCI.form.DummyValue.html#write">write</a></li>
610
611 </ul>
612 <ul class="events itemMembers">
613
614 </ul>
615 </li>
616
617 <li class="item" data-name="LuCI.form.DynamicList">
618 <span class="title">
619 <a href="LuCI.form.DynamicList.html">LuCI.form.DynamicList</a>
620
621 </span>
622 <ul class="members itemMembers">
623
624 <span class="subtitle">Members</span>
625
626 <li data-name="LuCI.form.DynamicList#datatype"><a href="LuCI.form.DynamicList.html#datatype">datatype</a></li>
627
628 <li data-name="LuCI.form.DynamicList#default"><a href="LuCI.form.DynamicList.html#default">default</a></li>
629
630 <li data-name="LuCI.form.DynamicList#editable"><a href="LuCI.form.DynamicList.html#editable">editable</a></li>
631
632 <li data-name="LuCI.form.DynamicList#modalonly"><a href="LuCI.form.DynamicList.html#modalonly">modalonly</a></li>
633
634 <li data-name="LuCI.form.DynamicList#onchange"><a href="LuCI.form.DynamicList.html#onchange">onchange</a></li>
635
636 <li data-name="LuCI.form.DynamicList#optional"><a href="LuCI.form.DynamicList.html#optional">optional</a></li>
637
638 <li data-name="LuCI.form.DynamicList#password"><a href="LuCI.form.DynamicList.html#password">password</a></li>
639
640 <li data-name="LuCI.form.DynamicList#placeholder"><a href="LuCI.form.DynamicList.html#placeholder">placeholder</a></li>
641
642 <li data-name="LuCI.form.DynamicList#readonly"><a href="LuCI.form.DynamicList.html#readonly">readonly</a></li>
643
644 <li data-name="LuCI.form.DynamicList#retain"><a href="LuCI.form.DynamicList.html#retain">retain</a></li>
645
646 <li data-name="LuCI.form.DynamicList#rmempty"><a href="LuCI.form.DynamicList.html#rmempty">rmempty</a></li>
647
648 <li data-name="LuCI.form.DynamicList#uciconfig"><a href="LuCI.form.DynamicList.html#uciconfig">uciconfig</a></li>
649
650 <li data-name="LuCI.form.DynamicList#ucioption"><a href="LuCI.form.DynamicList.html#ucioption">ucioption</a></li>
651
652 <li data-name="LuCI.form.DynamicList#ucisection"><a href="LuCI.form.DynamicList.html#ucisection">ucisection</a></li>
653
654 <li data-name="LuCI.form.DynamicList#validate"><a href="LuCI.form.DynamicList.html#validate">validate</a></li>
655
656 <li data-name="LuCI.form.DynamicList#width"><a href="LuCI.form.DynamicList.html#width">width</a></li>
657
658 </ul>
659 <ul class="typedefs itemMembers">
660
661 </ul>
662 <ul class="typedefs itemMembers">
663
664 </ul>
665 <ul class="methods itemMembers">
666
667 <span class="subtitle">Methods</span>
668
669 <li data-name="LuCI.form.DynamicList#append"><a href="LuCI.form.DynamicList.html#append">append</a></li>
670
671 <li data-name="LuCI.form.DynamicList#cbid"><a href="LuCI.form.DynamicList.html#cbid">cbid</a></li>
672
673 <li data-name="LuCI.form.DynamicList#cfgvalue"><a href="LuCI.form.DynamicList.html#cfgvalue">cfgvalue</a></li>
674
675 <li data-name="LuCI.form.DynamicList#depends"><a href="LuCI.form.DynamicList.html#depends">depends</a></li>
676
677 <li data-name="LuCI.form.DynamicList#formvalue"><a href="LuCI.form.DynamicList.html#formvalue">formvalue</a></li>
678
679 <li data-name="LuCI.form.DynamicList#getUIElement"><a href="LuCI.form.DynamicList.html#getUIElement">getUIElement</a></li>
680
681 <li data-name="LuCI.form.DynamicList#getValidationError"><a href="LuCI.form.DynamicList.html#getValidationError">getValidationError</a></li>
682
683 <li data-name="LuCI.form.DynamicList#isActive"><a href="LuCI.form.DynamicList.html#isActive">isActive</a></li>
684
685 <li data-name="LuCI.form.DynamicList#isValid"><a href="LuCI.form.DynamicList.html#isValid">isValid</a></li>
686
687 <li data-name="LuCI.form.DynamicList#load"><a href="LuCI.form.DynamicList.html#load">load</a></li>
688
689 <li data-name="LuCI.form.DynamicList#parse"><a href="LuCI.form.DynamicList.html#parse">parse</a></li>
690
691 <li data-name="LuCI.form.DynamicList#remove"><a href="LuCI.form.DynamicList.html#remove">remove</a></li>
692
693 <li data-name="LuCI.form.DynamicList#stripTags"><a href="LuCI.form.DynamicList.html#stripTags">stripTags</a></li>
694
695 <li data-name="LuCI.form.DynamicList#textvalue"><a href="LuCI.form.DynamicList.html#textvalue">textvalue</a></li>
696
697 <li data-name="LuCI.form.DynamicList#titleFn"><a href="LuCI.form.DynamicList.html#titleFn">titleFn</a></li>
698
699 <li data-name="LuCI.form.DynamicList#value"><a href="LuCI.form.DynamicList.html#value">value</a></li>
700
701 <li data-name="LuCI.form.DynamicList#write"><a href="LuCI.form.DynamicList.html#write">write</a></li>
702
703 </ul>
704 <ul class="events itemMembers">
705
706 </ul>
707 </li>
708
709 <li class="item" data-name="LuCI.form.FileUpload">
710 <span class="title">
711 <a href="LuCI.form.FileUpload.html">LuCI.form.FileUpload</a>
712
713 </span>
714 <ul class="members itemMembers">
715
716 <span class="subtitle">Members</span>
717
718 <li data-name="LuCI.form.FileUpload##enable_remove"><a href="LuCI.form.FileUpload.html#enable_remove">enable_remove</a></li>
719
720 <li data-name="LuCI.form.FileUpload##enable_upload"><a href="LuCI.form.FileUpload.html#enable_upload">enable_upload</a></li>
721
722 <li data-name="LuCI.form.FileUpload##root_directory"><a href="LuCI.form.FileUpload.html#root_directory">root_directory</a></li>
723
724 <li data-name="LuCI.form.FileUpload##show_hidden"><a href="LuCI.form.FileUpload.html#show_hidden">show_hidden</a></li>
725
726 <li data-name="LuCI.form.FileUpload#datatype"><a href="LuCI.form.FileUpload.html#datatype">datatype</a></li>
727
728 <li data-name="LuCI.form.FileUpload#default"><a href="LuCI.form.FileUpload.html#default">default</a></li>
729
730 <li data-name="LuCI.form.FileUpload#editable"><a href="LuCI.form.FileUpload.html#editable">editable</a></li>
731
732 <li data-name="LuCI.form.FileUpload#modalonly"><a href="LuCI.form.FileUpload.html#modalonly">modalonly</a></li>
733
734 <li data-name="LuCI.form.FileUpload#onchange"><a href="LuCI.form.FileUpload.html#onchange">onchange</a></li>
735
736 <li data-name="LuCI.form.FileUpload#optional"><a href="LuCI.form.FileUpload.html#optional">optional</a></li>
737
738 <li data-name="LuCI.form.FileUpload#password"><a href="LuCI.form.FileUpload.html#password">password</a></li>
739
740 <li data-name="LuCI.form.FileUpload#placeholder"><a href="LuCI.form.FileUpload.html#placeholder">placeholder</a></li>
741
742 <li data-name="LuCI.form.FileUpload#readonly"><a href="LuCI.form.FileUpload.html#readonly">readonly</a></li>
743
744 <li data-name="LuCI.form.FileUpload#retain"><a href="LuCI.form.FileUpload.html#retain">retain</a></li>
745
746 <li data-name="LuCI.form.FileUpload#rmempty"><a href="LuCI.form.FileUpload.html#rmempty">rmempty</a></li>
747
748 <li data-name="LuCI.form.FileUpload#uciconfig"><a href="LuCI.form.FileUpload.html#uciconfig">uciconfig</a></li>
749
750 <li data-name="LuCI.form.FileUpload#ucioption"><a href="LuCI.form.FileUpload.html#ucioption">ucioption</a></li>
751
752 <li data-name="LuCI.form.FileUpload#ucisection"><a href="LuCI.form.FileUpload.html#ucisection">ucisection</a></li>
753
754 <li data-name="LuCI.form.FileUpload#validate"><a href="LuCI.form.FileUpload.html#validate">validate</a></li>
755
756 <li data-name="LuCI.form.FileUpload#width"><a href="LuCI.form.FileUpload.html#width">width</a></li>
757
758 </ul>
759 <ul class="typedefs itemMembers">
760
761 </ul>
762 <ul class="typedefs itemMembers">
763
764 </ul>
765 <ul class="methods itemMembers">
766
767 <span class="subtitle">Methods</span>
768
769 <li data-name="LuCI.form.FileUpload#append"><a href="LuCI.form.FileUpload.html#append">append</a></li>
770
771 <li data-name="LuCI.form.FileUpload#cbid"><a href="LuCI.form.FileUpload.html#cbid">cbid</a></li>
772
773 <li data-name="LuCI.form.FileUpload#cfgvalue"><a href="LuCI.form.FileUpload.html#cfgvalue">cfgvalue</a></li>
774
775 <li data-name="LuCI.form.FileUpload#depends"><a href="LuCI.form.FileUpload.html#depends">depends</a></li>
776
777 <li data-name="LuCI.form.FileUpload#formvalue"><a href="LuCI.form.FileUpload.html#formvalue">formvalue</a></li>
778
779 <li data-name="LuCI.form.FileUpload#getUIElement"><a href="LuCI.form.FileUpload.html#getUIElement">getUIElement</a></li>
780
781 <li data-name="LuCI.form.FileUpload#getValidationError"><a href="LuCI.form.FileUpload.html#getValidationError">getValidationError</a></li>
782
783 <li data-name="LuCI.form.FileUpload#isActive"><a href="LuCI.form.FileUpload.html#isActive">isActive</a></li>
784
785 <li data-name="LuCI.form.FileUpload#isValid"><a href="LuCI.form.FileUpload.html#isValid">isValid</a></li>
786
787 <li data-name="LuCI.form.FileUpload#load"><a href="LuCI.form.FileUpload.html#load">load</a></li>
788
789 <li data-name="LuCI.form.FileUpload#parse"><a href="LuCI.form.FileUpload.html#parse">parse</a></li>
790
791 <li data-name="LuCI.form.FileUpload#remove"><a href="LuCI.form.FileUpload.html#remove">remove</a></li>
792
793 <li data-name="LuCI.form.FileUpload#stripTags"><a href="LuCI.form.FileUpload.html#stripTags">stripTags</a></li>
794
795 <li data-name="LuCI.form.FileUpload#textvalue"><a href="LuCI.form.FileUpload.html#textvalue">textvalue</a></li>
796
797 <li data-name="LuCI.form.FileUpload#titleFn"><a href="LuCI.form.FileUpload.html#titleFn">titleFn</a></li>
798
799 <li data-name="LuCI.form.FileUpload#value"><a href="LuCI.form.FileUpload.html#value">value</a></li>
800
801 <li data-name="LuCI.form.FileUpload#write"><a href="LuCI.form.FileUpload.html#write">write</a></li>
802
803 </ul>
804 <ul class="events itemMembers">
805
806 </ul>
807 </li>
808
809 <li class="item" data-name="LuCI.form.FlagValue">
810 <span class="title">
811 <a href="LuCI.form.FlagValue.html">LuCI.form.FlagValue</a>
812
813 </span>
814 <ul class="members itemMembers">
815
816 <span class="subtitle">Members</span>
817
818 <li data-name="LuCI.form.FlagValue##disabled"><a href="LuCI.form.FlagValue.html#disabled">disabled</a></li>
819
820 <li data-name="LuCI.form.FlagValue##enabled"><a href="LuCI.form.FlagValue.html#enabled">enabled</a></li>
821
822 <li data-name="LuCI.form.FlagValue#datatype"><a href="LuCI.form.FlagValue.html#datatype">datatype</a></li>
823
824 <li data-name="LuCI.form.FlagValue#default"><a href="LuCI.form.FlagValue.html#default">default</a></li>
825
826 <li data-name="LuCI.form.FlagValue#editable"><a href="LuCI.form.FlagValue.html#editable">editable</a></li>
827
828 <li data-name="LuCI.form.FlagValue#modalonly"><a href="LuCI.form.FlagValue.html#modalonly">modalonly</a></li>
829
830 <li data-name="LuCI.form.FlagValue#onchange"><a href="LuCI.form.FlagValue.html#onchange">onchange</a></li>
831
832 <li data-name="LuCI.form.FlagValue#optional"><a href="LuCI.form.FlagValue.html#optional">optional</a></li>
833
834 <li data-name="LuCI.form.FlagValue#password"><a href="LuCI.form.FlagValue.html#password">password</a></li>
835
836 <li data-name="LuCI.form.FlagValue#placeholder"><a href="LuCI.form.FlagValue.html#placeholder">placeholder</a></li>
837
838 <li data-name="LuCI.form.FlagValue#readonly"><a href="LuCI.form.FlagValue.html#readonly">readonly</a></li>
839
840 <li data-name="LuCI.form.FlagValue#retain"><a href="LuCI.form.FlagValue.html#retain">retain</a></li>
841
842 <li data-name="LuCI.form.FlagValue#rmempty"><a href="LuCI.form.FlagValue.html#rmempty">rmempty</a></li>
843
844 <li data-name="LuCI.form.FlagValue#uciconfig"><a href="LuCI.form.FlagValue.html#uciconfig">uciconfig</a></li>
845
846 <li data-name="LuCI.form.FlagValue#ucioption"><a href="LuCI.form.FlagValue.html#ucioption">ucioption</a></li>
847
848 <li data-name="LuCI.form.FlagValue#ucisection"><a href="LuCI.form.FlagValue.html#ucisection">ucisection</a></li>
849
850 <li data-name="LuCI.form.FlagValue#validate"><a href="LuCI.form.FlagValue.html#validate">validate</a></li>
851
852 <li data-name="LuCI.form.FlagValue#width"><a href="LuCI.form.FlagValue.html#width">width</a></li>
853
854 </ul>
855 <ul class="typedefs itemMembers">
856
857 </ul>
858 <ul class="typedefs itemMembers">
859
860 </ul>
861 <ul class="methods itemMembers">
862
863 <span class="subtitle">Methods</span>
864
865 <li data-name="LuCI.form.FlagValue#append"><a href="LuCI.form.FlagValue.html#append">append</a></li>
866
867 <li data-name="LuCI.form.FlagValue#cbid"><a href="LuCI.form.FlagValue.html#cbid">cbid</a></li>
868
869 <li data-name="LuCI.form.FlagValue#cfgvalue"><a href="LuCI.form.FlagValue.html#cfgvalue">cfgvalue</a></li>
870
871 <li data-name="LuCI.form.FlagValue#depends"><a href="LuCI.form.FlagValue.html#depends">depends</a></li>
872
873 <li data-name="LuCI.form.FlagValue#formvalue"><a href="LuCI.form.FlagValue.html#formvalue">formvalue</a></li>
874
875 <li data-name="LuCI.form.FlagValue#getUIElement"><a href="LuCI.form.FlagValue.html#getUIElement">getUIElement</a></li>
876
877 <li data-name="LuCI.form.FlagValue#getValidationError"><a href="LuCI.form.FlagValue.html#getValidationError">getValidationError</a></li>
878
879 <li data-name="LuCI.form.FlagValue#isActive"><a href="LuCI.form.FlagValue.html#isActive">isActive</a></li>
880
881 <li data-name="LuCI.form.FlagValue#isValid"><a href="LuCI.form.FlagValue.html#isValid">isValid</a></li>
882
883 <li data-name="LuCI.form.FlagValue#load"><a href="LuCI.form.FlagValue.html#load">load</a></li>
884
885 <li data-name="LuCI.form.FlagValue#parse"><a href="LuCI.form.FlagValue.html#parse">parse</a></li>
886
887 <li data-name="LuCI.form.FlagValue#remove"><a href="LuCI.form.FlagValue.html#remove">remove</a></li>
888
889 <li data-name="LuCI.form.FlagValue#stripTags"><a href="LuCI.form.FlagValue.html#stripTags">stripTags</a></li>
890
891 <li data-name="LuCI.form.FlagValue#textvalue"><a href="LuCI.form.FlagValue.html#textvalue">textvalue</a></li>
892
893 <li data-name="LuCI.form.FlagValue#titleFn"><a href="LuCI.form.FlagValue.html#titleFn">titleFn</a></li>
894
895 <li data-name="LuCI.form.FlagValue#value"><a href="LuCI.form.FlagValue.html#value">value</a></li>
896
897 <li data-name="LuCI.form.FlagValue#write"><a href="LuCI.form.FlagValue.html#write">write</a></li>
898
899 </ul>
900 <ul class="events itemMembers">
901
902 </ul>
903 </li>
904
905 <li class="item" data-name="LuCI.form.GridSection">
906 <span class="title">
907 <a href="LuCI.form.GridSection.html">LuCI.form.GridSection</a>
908
909 </span>
910 <ul class="members itemMembers">
911
912 <span class="subtitle">Members</span>
913
914 <li data-name="LuCI.form.GridSection#addbtntitle"><a href="LuCI.form.GridSection.html#addbtntitle">addbtntitle</a></li>
915
916 <li data-name="LuCI.form.GridSection#addremove"><a href="LuCI.form.GridSection.html#addremove">addremove</a></li>
917
918 <li data-name="LuCI.form.GridSection#anonymous"><a href="LuCI.form.GridSection.html#anonymous">anonymous</a></li>
919
920 <li data-name="LuCI.form.GridSection#extedit"><a href="LuCI.form.GridSection.html#extedit">extedit</a></li>
921
922 <li data-name="LuCI.form.GridSection#max_cols"><a href="LuCI.form.GridSection.html#max_cols">max_cols</a></li>
923
924 <li data-name="LuCI.form.GridSection#modaltitle"><a href="LuCI.form.GridSection.html#modaltitle">modaltitle</a></li>
925
926 <li data-name="LuCI.form.GridSection#nodescriptions"><a href="LuCI.form.GridSection.html#nodescriptions">nodescriptions</a></li>
927
928 <li data-name="LuCI.form.GridSection#parentoption"><a href="LuCI.form.GridSection.html#parentoption">parentoption</a></li>
929
930 <li data-name="LuCI.form.GridSection#rowcolors"><a href="LuCI.form.GridSection.html#rowcolors">rowcolors</a></li>
931
932 <li data-name="LuCI.form.GridSection#sectiontitle"><a href="LuCI.form.GridSection.html#sectiontitle">sectiontitle</a></li>
933
934 <li data-name="LuCI.form.GridSection#sortable"><a href="LuCI.form.GridSection.html#sortable">sortable</a></li>
935
936 <li data-name="LuCI.form.GridSection#tabbed"><a href="LuCI.form.GridSection.html#tabbed">tabbed</a></li>
937
938 <li data-name="LuCI.form.GridSection#tooltip"><a href="LuCI.form.GridSection.html#tooltip">tooltip</a></li>
939
940 <li data-name="LuCI.form.GridSection#tooltipicon"><a href="LuCI.form.GridSection.html#tooltipicon">tooltipicon</a></li>
941
942 <li data-name="LuCI.form.GridSection#uciconfig"><a href="LuCI.form.GridSection.html#uciconfig">uciconfig</a></li>
943
944 </ul>
945 <ul class="typedefs itemMembers">
946
947 </ul>
948 <ul class="typedefs itemMembers">
949
950 </ul>
951 <ul class="methods itemMembers">
952
953 <span class="subtitle">Methods</span>
954
955 <li data-name="LuCI.form.GridSection#addModalOptions"><a href="LuCI.form.GridSection.html#addModalOptions">addModalOptions</a></li>
956
957 <li data-name="LuCI.form.GridSection#append"><a href="LuCI.form.GridSection.html#append">append</a></li>
958
959 <li data-name="LuCI.form.GridSection#cfgvalue"><a href="LuCI.form.GridSection.html#cfgvalue">cfgvalue</a></li>
960
961 <li data-name="LuCI.form.GridSection#filter"><a href="LuCI.form.GridSection.html#filter">filter</a></li>
962
963 <li data-name="LuCI.form.GridSection#formvalue"><a href="LuCI.form.GridSection.html#formvalue">formvalue</a></li>
964
965 <li data-name="LuCI.form.GridSection#getOption"><a href="LuCI.form.GridSection.html#getOption">getOption</a></li>
966
967 <li data-name="LuCI.form.GridSection#getUIElement"><a href="LuCI.form.GridSection.html#getUIElement">getUIElement</a></li>
968
969 <li data-name="LuCI.form.GridSection#load"><a href="LuCI.form.GridSection.html#load">load</a></li>
970
971 <li data-name="LuCI.form.GridSection#option"><a href="LuCI.form.GridSection.html#option">option</a></li>
972
973 <li data-name="LuCI.form.GridSection#parse"><a href="LuCI.form.GridSection.html#parse">parse</a></li>
974
975 <li data-name="LuCI.form.GridSection#stripTags"><a href="LuCI.form.GridSection.html#stripTags">stripTags</a></li>
976
977 <li data-name="LuCI.form.GridSection#tab"><a href="LuCI.form.GridSection.html#tab">tab</a></li>
978
979 <li data-name="LuCI.form.GridSection#taboption"><a href="LuCI.form.GridSection.html#taboption">taboption</a></li>
980
981 <li data-name="LuCI.form.GridSection#titleFn"><a href="LuCI.form.GridSection.html#titleFn">titleFn</a></li>
982
983 </ul>
984 <ul class="events itemMembers">
985
986 </ul>
987 </li>
988
989 <li class="item" data-name="LuCI.form.HiddenValue">
990 <span class="title">
991 <a href="LuCI.form.HiddenValue.html">LuCI.form.HiddenValue</a>
992
993 </span>
994 <ul class="members itemMembers">
995
996 <span class="subtitle">Members</span>
997
998 <li data-name="LuCI.form.HiddenValue#datatype"><a href="LuCI.form.HiddenValue.html#datatype">datatype</a></li>
999
1000 <li data-name="LuCI.form.HiddenValue#default"><a href="LuCI.form.HiddenValue.html#default">default</a></li>
1001
1002 <li data-name="LuCI.form.HiddenValue#editable"><a href="LuCI.form.HiddenValue.html#editable">editable</a></li>
1003
1004 <li data-name="LuCI.form.HiddenValue#modalonly"><a href="LuCI.form.HiddenValue.html#modalonly">modalonly</a></li>
1005
1006 <li data-name="LuCI.form.HiddenValue#onchange"><a href="LuCI.form.HiddenValue.html#onchange">onchange</a></li>
1007
1008 <li data-name="LuCI.form.HiddenValue#optional"><a href="LuCI.form.HiddenValue.html#optional">optional</a></li>
1009
1010 <li data-name="LuCI.form.HiddenValue#password"><a href="LuCI.form.HiddenValue.html#password">password</a></li>
1011
1012 <li data-name="LuCI.form.HiddenValue#placeholder"><a href="LuCI.form.HiddenValue.html#placeholder">placeholder</a></li>
1013
1014 <li data-name="LuCI.form.HiddenValue#readonly"><a href="LuCI.form.HiddenValue.html#readonly">readonly</a></li>
1015
1016 <li data-name="LuCI.form.HiddenValue#retain"><a href="LuCI.form.HiddenValue.html#retain">retain</a></li>
1017
1018 <li data-name="LuCI.form.HiddenValue#rmempty"><a href="LuCI.form.HiddenValue.html#rmempty">rmempty</a></li>
1019
1020 <li data-name="LuCI.form.HiddenValue#uciconfig"><a href="LuCI.form.HiddenValue.html#uciconfig">uciconfig</a></li>
1021
1022 <li data-name="LuCI.form.HiddenValue#ucioption"><a href="LuCI.form.HiddenValue.html#ucioption">ucioption</a></li>
1023
1024 <li data-name="LuCI.form.HiddenValue#ucisection"><a href="LuCI.form.HiddenValue.html#ucisection">ucisection</a></li>
1025
1026 <li data-name="LuCI.form.HiddenValue#validate"><a href="LuCI.form.HiddenValue.html#validate">validate</a></li>
1027
1028 <li data-name="LuCI.form.HiddenValue#width"><a href="LuCI.form.HiddenValue.html#width">width</a></li>
1029
1030 </ul>
1031 <ul class="typedefs itemMembers">
1032
1033 </ul>
1034 <ul class="typedefs itemMembers">
1035
1036 </ul>
1037 <ul class="methods itemMembers">
1038
1039 <span class="subtitle">Methods</span>
1040
1041 <li data-name="LuCI.form.HiddenValue#append"><a href="LuCI.form.HiddenValue.html#append">append</a></li>
1042
1043 <li data-name="LuCI.form.HiddenValue#cbid"><a href="LuCI.form.HiddenValue.html#cbid">cbid</a></li>
1044
1045 <li data-name="LuCI.form.HiddenValue#cfgvalue"><a href="LuCI.form.HiddenValue.html#cfgvalue">cfgvalue</a></li>
1046
1047 <li data-name="LuCI.form.HiddenValue#depends"><a href="LuCI.form.HiddenValue.html#depends">depends</a></li>
1048
1049 <li data-name="LuCI.form.HiddenValue#formvalue"><a href="LuCI.form.HiddenValue.html#formvalue">formvalue</a></li>
1050
1051 <li data-name="LuCI.form.HiddenValue#getUIElement"><a href="LuCI.form.HiddenValue.html#getUIElement">getUIElement</a></li>
1052
1053 <li data-name="LuCI.form.HiddenValue#getValidationError"><a href="LuCI.form.HiddenValue.html#getValidationError">getValidationError</a></li>
1054
1055 <li data-name="LuCI.form.HiddenValue#isActive"><a href="LuCI.form.HiddenValue.html#isActive">isActive</a></li>
1056
1057 <li data-name="LuCI.form.HiddenValue#isValid"><a href="LuCI.form.HiddenValue.html#isValid">isValid</a></li>
1058
1059 <li data-name="LuCI.form.HiddenValue#load"><a href="LuCI.form.HiddenValue.html#load">load</a></li>
1060
1061 <li data-name="LuCI.form.HiddenValue#parse"><a href="LuCI.form.HiddenValue.html#parse">parse</a></li>
1062
1063 <li data-name="LuCI.form.HiddenValue#remove"><a href="LuCI.form.HiddenValue.html#remove">remove</a></li>
1064
1065 <li data-name="LuCI.form.HiddenValue#stripTags"><a href="LuCI.form.HiddenValue.html#stripTags">stripTags</a></li>
1066
1067 <li data-name="LuCI.form.HiddenValue#textvalue"><a href="LuCI.form.HiddenValue.html#textvalue">textvalue</a></li>
1068
1069 <li data-name="LuCI.form.HiddenValue#titleFn"><a href="LuCI.form.HiddenValue.html#titleFn">titleFn</a></li>
1070
1071 <li data-name="LuCI.form.HiddenValue#value"><a href="LuCI.form.HiddenValue.html#value">value</a></li>
1072
1073 <li data-name="LuCI.form.HiddenValue#write"><a href="LuCI.form.HiddenValue.html#write">write</a></li>
1074
1075 </ul>
1076 <ul class="events itemMembers">
1077
1078 </ul>
1079 </li>
1080
1081 <li class="item" data-name="LuCI.form.JSONMap">
1082 <span class="title">
1083 <a href="LuCI.form.JSONMap.html">LuCI.form.JSONMap</a>
1084
1085 </span>
1086 <ul class="members itemMembers">
1087
1088 <span class="subtitle">Members</span>
1089
1090 <li data-name="LuCI.form.JSONMap#readonly"><a href="LuCI.form.JSONMap.html#readonly">readonly</a></li>
1091
1092 </ul>
1093 <ul class="typedefs itemMembers">
1094
1095 </ul>
1096 <ul class="typedefs itemMembers">
1097
1098 </ul>
1099 <ul class="methods itemMembers">
1100
1101 <span class="subtitle">Methods</span>
1102
1103 <li data-name="LuCI.form.JSONMap#append"><a href="LuCI.form.JSONMap.html#append">append</a></li>
1104
1105 <li data-name="LuCI.form.JSONMap#chain"><a href="LuCI.form.JSONMap.html#chain">chain</a></li>
1106
1107 <li data-name="LuCI.form.JSONMap#findElement"><a href="LuCI.form.JSONMap.html#findElement">findElement</a></li>
1108
1109 <li data-name="LuCI.form.JSONMap#findElements"><a href="LuCI.form.JSONMap.html#findElements">findElements</a></li>
1110
1111 <li data-name="LuCI.form.JSONMap#load"><a href="LuCI.form.JSONMap.html#load">load</a></li>
1112
1113 <li data-name="LuCI.form.JSONMap#lookupOption"><a href="LuCI.form.JSONMap.html#lookupOption">lookupOption</a></li>
1114
1115 <li data-name="LuCI.form.JSONMap#parse"><a href="LuCI.form.JSONMap.html#parse">parse</a></li>
1116
1117 <li data-name="LuCI.form.JSONMap#render"><a href="LuCI.form.JSONMap.html#render">render</a></li>
1118
1119 <li data-name="LuCI.form.JSONMap#reset"><a href="LuCI.form.JSONMap.html#reset">reset</a></li>
1120
1121 <li data-name="LuCI.form.JSONMap#save"><a href="LuCI.form.JSONMap.html#save">save</a></li>
1122
1123 <li data-name="LuCI.form.JSONMap#section"><a href="LuCI.form.JSONMap.html#section">section</a></li>
1124
1125 <li data-name="LuCI.form.JSONMap#stripTags"><a href="LuCI.form.JSONMap.html#stripTags">stripTags</a></li>
1126
1127 <li data-name="LuCI.form.JSONMap#titleFn"><a href="LuCI.form.JSONMap.html#titleFn">titleFn</a></li>
1128
1129 </ul>
1130 <ul class="events itemMembers">
1131
1132 </ul>
1133 </li>
1134
1135 <li class="item" data-name="LuCI.form.ListValue">
1136 <span class="title">
1137 <a href="LuCI.form.ListValue.html">LuCI.form.ListValue</a>
1138
1139 </span>
1140 <ul class="members itemMembers">
1141
1142 <span class="subtitle">Members</span>
1143
1144 <li data-name="LuCI.form.ListValue##orientation"><a href="LuCI.form.ListValue.html#orientation">orientation</a></li>
1145
1146 <li data-name="LuCI.form.ListValue##size"><a href="LuCI.form.ListValue.html#size">size</a></li>
1147
1148 <li data-name="LuCI.form.ListValue##widget"><a href="LuCI.form.ListValue.html#widget">widget</a></li>
1149
1150 <li data-name="LuCI.form.ListValue#datatype"><a href="LuCI.form.ListValue.html#datatype">datatype</a></li>
1151
1152 <li data-name="LuCI.form.ListValue#default"><a href="LuCI.form.ListValue.html#default">default</a></li>
1153
1154 <li data-name="LuCI.form.ListValue#editable"><a href="LuCI.form.ListValue.html#editable">editable</a></li>
1155
1156 <li data-name="LuCI.form.ListValue#modalonly"><a href="LuCI.form.ListValue.html#modalonly">modalonly</a></li>
1157
1158 <li data-name="LuCI.form.ListValue#onchange"><a href="LuCI.form.ListValue.html#onchange">onchange</a></li>
1159
1160 <li data-name="LuCI.form.ListValue#optional"><a href="LuCI.form.ListValue.html#optional">optional</a></li>
1161
1162 <li data-name="LuCI.form.ListValue#password"><a href="LuCI.form.ListValue.html#password">password</a></li>
1163
1164 <li data-name="LuCI.form.ListValue#placeholder"><a href="LuCI.form.ListValue.html#placeholder">placeholder</a></li>
1165
1166 <li data-name="LuCI.form.ListValue#readonly"><a href="LuCI.form.ListValue.html#readonly">readonly</a></li>
1167
1168 <li data-name="LuCI.form.ListValue#retain"><a href="LuCI.form.ListValue.html#retain">retain</a></li>
1169
1170 <li data-name="LuCI.form.ListValue#rmempty"><a href="LuCI.form.ListValue.html#rmempty">rmempty</a></li>
1171
1172 <li data-name="LuCI.form.ListValue#uciconfig"><a href="LuCI.form.ListValue.html#uciconfig">uciconfig</a></li>
1173
1174 <li data-name="LuCI.form.ListValue#ucioption"><a href="LuCI.form.ListValue.html#ucioption">ucioption</a></li>
1175
1176 <li data-name="LuCI.form.ListValue#ucisection"><a href="LuCI.form.ListValue.html#ucisection">ucisection</a></li>
1177
1178 <li data-name="LuCI.form.ListValue#validate"><a href="LuCI.form.ListValue.html#validate">validate</a></li>
1179
1180 <li data-name="LuCI.form.ListValue#width"><a href="LuCI.form.ListValue.html#width">width</a></li>
1181
1182 </ul>
1183 <ul class="typedefs itemMembers">
1184
1185 </ul>
1186 <ul class="typedefs itemMembers">
1187
1188 </ul>
1189 <ul class="methods itemMembers">
1190
1191 <span class="subtitle">Methods</span>
1192
1193 <li data-name="LuCI.form.ListValue#append"><a href="LuCI.form.ListValue.html#append">append</a></li>
1194
1195 <li data-name="LuCI.form.ListValue#cbid"><a href="LuCI.form.ListValue.html#cbid">cbid</a></li>
1196
1197 <li data-name="LuCI.form.ListValue#cfgvalue"><a href="LuCI.form.ListValue.html#cfgvalue">cfgvalue</a></li>
1198
1199 <li data-name="LuCI.form.ListValue#depends"><a href="LuCI.form.ListValue.html#depends">depends</a></li>
1200
1201 <li data-name="LuCI.form.ListValue#formvalue"><a href="LuCI.form.ListValue.html#formvalue">formvalue</a></li>
1202
1203 <li data-name="LuCI.form.ListValue#getUIElement"><a href="LuCI.form.ListValue.html#getUIElement">getUIElement</a></li>
1204
1205 <li data-name="LuCI.form.ListValue#getValidationError"><a href="LuCI.form.ListValue.html#getValidationError">getValidationError</a></li>
1206
1207 <li data-name="LuCI.form.ListValue#isActive"><a href="LuCI.form.ListValue.html#isActive">isActive</a></li>
1208
1209 <li data-name="LuCI.form.ListValue#isValid"><a href="LuCI.form.ListValue.html#isValid">isValid</a></li>
1210
1211 <li data-name="LuCI.form.ListValue#load"><a href="LuCI.form.ListValue.html#load">load</a></li>
1212
1213 <li data-name="LuCI.form.ListValue#parse"><a href="LuCI.form.ListValue.html#parse">parse</a></li>
1214
1215 <li data-name="LuCI.form.ListValue#remove"><a href="LuCI.form.ListValue.html#remove">remove</a></li>
1216
1217 <li data-name="LuCI.form.ListValue#stripTags"><a href="LuCI.form.ListValue.html#stripTags">stripTags</a></li>
1218
1219 <li data-name="LuCI.form.ListValue#textvalue"><a href="LuCI.form.ListValue.html#textvalue">textvalue</a></li>
1220
1221 <li data-name="LuCI.form.ListValue#titleFn"><a href="LuCI.form.ListValue.html#titleFn">titleFn</a></li>
1222
1223 <li data-name="LuCI.form.ListValue#value"><a href="LuCI.form.ListValue.html#value">value</a></li>
1224
1225 <li data-name="LuCI.form.ListValue#write"><a href="LuCI.form.ListValue.html#write">write</a></li>
1226
1227 </ul>
1228 <ul class="events itemMembers">
1229
1230 </ul>
1231 </li>
1232
1233 <li class="item" data-name="LuCI.form.Map">
1234 <span class="title">
1235 <a href="LuCI.form.Map.html">LuCI.form.Map</a>
1236
1237 </span>
1238 <ul class="members itemMembers">
1239
1240 <span class="subtitle">Members</span>
1241
1242 <li data-name="LuCI.form.Map##readonly"><a href="LuCI.form.Map.html#readonly">readonly</a></li>
1243
1244 </ul>
1245 <ul class="typedefs itemMembers">
1246
1247 </ul>
1248 <ul class="typedefs itemMembers">
1249
1250 </ul>
1251 <ul class="methods itemMembers">
1252
1253 <span class="subtitle">Methods</span>
1254
1255 <li data-name="LuCI.form.Map#append"><a href="LuCI.form.Map.html#append">append</a></li>
1256
1257 <li data-name="LuCI.form.Map#chain"><a href="LuCI.form.Map.html#chain">chain</a></li>
1258
1259 <li data-name="LuCI.form.Map#findElement"><a href="LuCI.form.Map.html#findElement">findElement</a></li>
1260
1261 <li data-name="LuCI.form.Map#findElements"><a href="LuCI.form.Map.html#findElements">findElements</a></li>
1262
1263 <li data-name="LuCI.form.Map#load"><a href="LuCI.form.Map.html#load">load</a></li>
1264
1265 <li data-name="LuCI.form.Map#lookupOption"><a href="LuCI.form.Map.html#lookupOption">lookupOption</a></li>
1266
1267 <li data-name="LuCI.form.Map#parse"><a href="LuCI.form.Map.html#parse">parse</a></li>
1268
1269 <li data-name="LuCI.form.Map#render"><a href="LuCI.form.Map.html#render">render</a></li>
1270
1271 <li data-name="LuCI.form.Map#reset"><a href="LuCI.form.Map.html#reset">reset</a></li>
1272
1273 <li data-name="LuCI.form.Map#save"><a href="LuCI.form.Map.html#save">save</a></li>
1274
1275 <li data-name="LuCI.form.Map#section"><a href="LuCI.form.Map.html#section">section</a></li>
1276
1277 <li data-name="LuCI.form.Map#stripTags"><a href="LuCI.form.Map.html#stripTags">stripTags</a></li>
1278
1279 <li data-name="LuCI.form.Map#titleFn"><a href="LuCI.form.Map.html#titleFn">titleFn</a></li>
1280
1281 </ul>
1282 <ul class="events itemMembers">
1283
1284 </ul>
1285 </li>
1286
1287 <li class="item" data-name="LuCI.form.MultiValue">
1288 <span class="title">
1289 <a href="LuCI.form.MultiValue.html">LuCI.form.MultiValue</a>
1290
1291 </span>
1292 <ul class="members itemMembers">
1293
1294 <span class="subtitle">Members</span>
1295
1296 <li data-name="LuCI.form.MultiValue##display_size"><a href="LuCI.form.MultiValue.html#display_size">display_size</a></li>
1297
1298 <li data-name="LuCI.form.MultiValue##dropdown_size"><a href="LuCI.form.MultiValue.html#dropdown_size">dropdown_size</a></li>
1299
1300 <li data-name="LuCI.form.MultiValue#datatype"><a href="LuCI.form.MultiValue.html#datatype">datatype</a></li>
1301
1302 <li data-name="LuCI.form.MultiValue#default"><a href="LuCI.form.MultiValue.html#default">default</a></li>
1303
1304 <li data-name="LuCI.form.MultiValue#editable"><a href="LuCI.form.MultiValue.html#editable">editable</a></li>
1305
1306 <li data-name="LuCI.form.MultiValue#modalonly"><a href="LuCI.form.MultiValue.html#modalonly">modalonly</a></li>
1307
1308 <li data-name="LuCI.form.MultiValue#onchange"><a href="LuCI.form.MultiValue.html#onchange">onchange</a></li>
1309
1310 <li data-name="LuCI.form.MultiValue#optional"><a href="LuCI.form.MultiValue.html#optional">optional</a></li>
1311
1312 <li data-name="LuCI.form.MultiValue#password"><a href="LuCI.form.MultiValue.html#password">password</a></li>
1313
1314 <li data-name="LuCI.form.MultiValue#placeholder"><a href="LuCI.form.MultiValue.html#placeholder">placeholder</a></li>
1315
1316 <li data-name="LuCI.form.MultiValue#readonly"><a href="LuCI.form.MultiValue.html#readonly">readonly</a></li>
1317
1318 <li data-name="LuCI.form.MultiValue#retain"><a href="LuCI.form.MultiValue.html#retain">retain</a></li>
1319
1320 <li data-name="LuCI.form.MultiValue#rmempty"><a href="LuCI.form.MultiValue.html#rmempty">rmempty</a></li>
1321
1322 <li data-name="LuCI.form.MultiValue#uciconfig"><a href="LuCI.form.MultiValue.html#uciconfig">uciconfig</a></li>
1323
1324 <li data-name="LuCI.form.MultiValue#ucioption"><a href="LuCI.form.MultiValue.html#ucioption">ucioption</a></li>
1325
1326 <li data-name="LuCI.form.MultiValue#ucisection"><a href="LuCI.form.MultiValue.html#ucisection">ucisection</a></li>
1327
1328 <li data-name="LuCI.form.MultiValue#validate"><a href="LuCI.form.MultiValue.html#validate">validate</a></li>
1329
1330 <li data-name="LuCI.form.MultiValue#width"><a href="LuCI.form.MultiValue.html#width">width</a></li>
1331
1332 </ul>
1333 <ul class="typedefs itemMembers">
1334
1335 </ul>
1336 <ul class="typedefs itemMembers">
1337
1338 </ul>
1339 <ul class="methods itemMembers">
1340
1341 <span class="subtitle">Methods</span>
1342
1343 <li data-name="LuCI.form.MultiValue#append"><a href="LuCI.form.MultiValue.html#append">append</a></li>
1344
1345 <li data-name="LuCI.form.MultiValue#cbid"><a href="LuCI.form.MultiValue.html#cbid">cbid</a></li>
1346
1347 <li data-name="LuCI.form.MultiValue#cfgvalue"><a href="LuCI.form.MultiValue.html#cfgvalue">cfgvalue</a></li>
1348
1349 <li data-name="LuCI.form.MultiValue#depends"><a href="LuCI.form.MultiValue.html#depends">depends</a></li>
1350
1351 <li data-name="LuCI.form.MultiValue#formvalue"><a href="LuCI.form.MultiValue.html#formvalue">formvalue</a></li>
1352
1353 <li data-name="LuCI.form.MultiValue#getUIElement"><a href="LuCI.form.MultiValue.html#getUIElement">getUIElement</a></li>
1354
1355 <li data-name="LuCI.form.MultiValue#getValidationError"><a href="LuCI.form.MultiValue.html#getValidationError">getValidationError</a></li>
1356
1357 <li data-name="LuCI.form.MultiValue#isActive"><a href="LuCI.form.MultiValue.html#isActive">isActive</a></li>
1358
1359 <li data-name="LuCI.form.MultiValue#isValid"><a href="LuCI.form.MultiValue.html#isValid">isValid</a></li>
1360
1361 <li data-name="LuCI.form.MultiValue#load"><a href="LuCI.form.MultiValue.html#load">load</a></li>
1362
1363 <li data-name="LuCI.form.MultiValue#parse"><a href="LuCI.form.MultiValue.html#parse">parse</a></li>
1364
1365 <li data-name="LuCI.form.MultiValue#remove"><a href="LuCI.form.MultiValue.html#remove">remove</a></li>
1366
1367 <li data-name="LuCI.form.MultiValue#stripTags"><a href="LuCI.form.MultiValue.html#stripTags">stripTags</a></li>
1368
1369 <li data-name="LuCI.form.MultiValue#textvalue"><a href="LuCI.form.MultiValue.html#textvalue">textvalue</a></li>
1370
1371 <li data-name="LuCI.form.MultiValue#titleFn"><a href="LuCI.form.MultiValue.html#titleFn">titleFn</a></li>
1372
1373 <li data-name="LuCI.form.MultiValue#value"><a href="LuCI.form.MultiValue.html#value">value</a></li>
1374
1375 <li data-name="LuCI.form.MultiValue#write"><a href="LuCI.form.MultiValue.html#write">write</a></li>
1376
1377 </ul>
1378 <ul class="events itemMembers">
1379
1380 </ul>
1381 </li>
1382
1383 <li class="item" data-name="LuCI.form.NamedSection">
1384 <span class="title">
1385 <a href="LuCI.form.NamedSection.html">LuCI.form.NamedSection</a>
1386
1387 </span>
1388 <ul class="members itemMembers">
1389
1390 <span class="subtitle">Members</span>
1391
1392 <li data-name="LuCI.form.NamedSection##addremove"><a href="LuCI.form.NamedSection.html#addremove">addremove</a></li>
1393
1394 <li data-name="LuCI.form.NamedSection##uciconfig"><a href="LuCI.form.NamedSection.html#uciconfig">uciconfig</a></li>
1395
1396 <li data-name="LuCI.form.NamedSection#parentoption"><a href="LuCI.form.NamedSection.html#parentoption">parentoption</a></li>
1397
1398 </ul>
1399 <ul class="typedefs itemMembers">
1400
1401 </ul>
1402 <ul class="typedefs itemMembers">
1403
1404 </ul>
1405 <ul class="methods itemMembers">
1406
1407 <span class="subtitle">Methods</span>
1408
1409 <li data-name="LuCI.form.NamedSection#append"><a href="LuCI.form.NamedSection.html#append">append</a></li>
1410
1411 <li data-name="LuCI.form.NamedSection#cfgsections"><a href="LuCI.form.NamedSection.html#cfgsections">cfgsections</a></li>
1412
1413 <li data-name="LuCI.form.NamedSection#cfgvalue"><a href="LuCI.form.NamedSection.html#cfgvalue">cfgvalue</a></li>
1414
1415 <li data-name="LuCI.form.NamedSection#filter"><a href="LuCI.form.NamedSection.html#filter">filter</a></li>
1416
1417 <li data-name="LuCI.form.NamedSection#formvalue"><a href="LuCI.form.NamedSection.html#formvalue">formvalue</a></li>
1418
1419 <li data-name="LuCI.form.NamedSection#getOption"><a href="LuCI.form.NamedSection.html#getOption">getOption</a></li>
1420
1421 <li data-name="LuCI.form.NamedSection#getUIElement"><a href="LuCI.form.NamedSection.html#getUIElement">getUIElement</a></li>
1422
1423 <li data-name="LuCI.form.NamedSection#load"><a href="LuCI.form.NamedSection.html#load">load</a></li>
1424
1425 <li data-name="LuCI.form.NamedSection#option"><a href="LuCI.form.NamedSection.html#option">option</a></li>
1426
1427 <li data-name="LuCI.form.NamedSection#parse"><a href="LuCI.form.NamedSection.html#parse">parse</a></li>
1428
1429 <li data-name="LuCI.form.NamedSection#render"><a href="LuCI.form.NamedSection.html#render">render</a></li>
1430
1431 <li data-name="LuCI.form.NamedSection#stripTags"><a href="LuCI.form.NamedSection.html#stripTags">stripTags</a></li>
1432
1433 <li data-name="LuCI.form.NamedSection#tab"><a href="LuCI.form.NamedSection.html#tab">tab</a></li>
1434
1435 <li data-name="LuCI.form.NamedSection#taboption"><a href="LuCI.form.NamedSection.html#taboption">taboption</a></li>
1436
1437 <li data-name="LuCI.form.NamedSection#titleFn"><a href="LuCI.form.NamedSection.html#titleFn">titleFn</a></li>
1438
1439 </ul>
1440 <ul class="events itemMembers">
1441
1442 </ul>
1443 </li>
1444
1445 <li class="item" data-name="LuCI.form.SectionValue">
1446 <span class="title">
1447 <a href="LuCI.form.SectionValue.html">LuCI.form.SectionValue</a>
1448
1449 </span>
1450 <ul class="members itemMembers">
1451
1452 <span class="subtitle">Members</span>
1453
1454 <li data-name="LuCI.form.SectionValue##subsection"><a href="LuCI.form.SectionValue.html#subsection">subsection</a></li>
1455
1456 <li data-name="LuCI.form.SectionValue#datatype"><a href="LuCI.form.SectionValue.html#datatype">datatype</a></li>
1457
1458 <li data-name="LuCI.form.SectionValue#default"><a href="LuCI.form.SectionValue.html#default">default</a></li>
1459
1460 <li data-name="LuCI.form.SectionValue#editable"><a href="LuCI.form.SectionValue.html#editable">editable</a></li>
1461
1462 <li data-name="LuCI.form.SectionValue#modalonly"><a href="LuCI.form.SectionValue.html#modalonly">modalonly</a></li>
1463
1464 <li data-name="LuCI.form.SectionValue#onchange"><a href="LuCI.form.SectionValue.html#onchange">onchange</a></li>
1465
1466 <li data-name="LuCI.form.SectionValue#optional"><a href="LuCI.form.SectionValue.html#optional">optional</a></li>
1467
1468 <li data-name="LuCI.form.SectionValue#password"><a href="LuCI.form.SectionValue.html#password">password</a></li>
1469
1470 <li data-name="LuCI.form.SectionValue#placeholder"><a href="LuCI.form.SectionValue.html#placeholder">placeholder</a></li>
1471
1472 <li data-name="LuCI.form.SectionValue#readonly"><a href="LuCI.form.SectionValue.html#readonly">readonly</a></li>
1473
1474 <li data-name="LuCI.form.SectionValue#retain"><a href="LuCI.form.SectionValue.html#retain">retain</a></li>
1475
1476 <li data-name="LuCI.form.SectionValue#rmempty"><a href="LuCI.form.SectionValue.html#rmempty">rmempty</a></li>
1477
1478 <li data-name="LuCI.form.SectionValue#uciconfig"><a href="LuCI.form.SectionValue.html#uciconfig">uciconfig</a></li>
1479
1480 <li data-name="LuCI.form.SectionValue#ucioption"><a href="LuCI.form.SectionValue.html#ucioption">ucioption</a></li>
1481
1482 <li data-name="LuCI.form.SectionValue#ucisection"><a href="LuCI.form.SectionValue.html#ucisection">ucisection</a></li>
1483
1484 <li data-name="LuCI.form.SectionValue#validate"><a href="LuCI.form.SectionValue.html#validate">validate</a></li>
1485
1486 <li data-name="LuCI.form.SectionValue#width"><a href="LuCI.form.SectionValue.html#width">width</a></li>
1487
1488 </ul>
1489 <ul class="typedefs itemMembers">
1490
1491 </ul>
1492 <ul class="typedefs itemMembers">
1493
1494 </ul>
1495 <ul class="methods itemMembers">
1496
1497 <span class="subtitle">Methods</span>
1498
1499 <li data-name="LuCI.form.SectionValue#append"><a href="LuCI.form.SectionValue.html#append">append</a></li>
1500
1501 <li data-name="LuCI.form.SectionValue#cbid"><a href="LuCI.form.SectionValue.html#cbid">cbid</a></li>
1502
1503 <li data-name="LuCI.form.SectionValue#cfgvalue"><a href="LuCI.form.SectionValue.html#cfgvalue">cfgvalue</a></li>
1504
1505 <li data-name="LuCI.form.SectionValue#depends"><a href="LuCI.form.SectionValue.html#depends">depends</a></li>
1506
1507 <li data-name="LuCI.form.SectionValue#formvalue"><a href="LuCI.form.SectionValue.html#formvalue">formvalue</a></li>
1508
1509 <li data-name="LuCI.form.SectionValue#getUIElement"><a href="LuCI.form.SectionValue.html#getUIElement">getUIElement</a></li>
1510
1511 <li data-name="LuCI.form.SectionValue#getValidationError"><a href="LuCI.form.SectionValue.html#getValidationError">getValidationError</a></li>
1512
1513 <li data-name="LuCI.form.SectionValue#isActive"><a href="LuCI.form.SectionValue.html#isActive">isActive</a></li>
1514
1515 <li data-name="LuCI.form.SectionValue#isValid"><a href="LuCI.form.SectionValue.html#isValid">isValid</a></li>
1516
1517 <li data-name="LuCI.form.SectionValue#load"><a href="LuCI.form.SectionValue.html#load">load</a></li>
1518
1519 <li data-name="LuCI.form.SectionValue#parse"><a href="LuCI.form.SectionValue.html#parse">parse</a></li>
1520
1521 <li data-name="LuCI.form.SectionValue#remove"><a href="LuCI.form.SectionValue.html#remove">remove</a></li>
1522
1523 <li data-name="LuCI.form.SectionValue#stripTags"><a href="LuCI.form.SectionValue.html#stripTags">stripTags</a></li>
1524
1525 <li data-name="LuCI.form.SectionValue#textvalue"><a href="LuCI.form.SectionValue.html#textvalue">textvalue</a></li>
1526
1527 <li data-name="LuCI.form.SectionValue#titleFn"><a href="LuCI.form.SectionValue.html#titleFn">titleFn</a></li>
1528
1529 <li data-name="LuCI.form.SectionValue#value"><a href="LuCI.form.SectionValue.html#value">value</a></li>
1530
1531 <li data-name="LuCI.form.SectionValue#write"><a href="LuCI.form.SectionValue.html#write">write</a></li>
1532
1533 </ul>
1534 <ul class="events itemMembers">
1535
1536 </ul>
1537 </li>
1538
1539 <li class="item" data-name="LuCI.form.TableSection">
1540 <span class="title">
1541 <a href="LuCI.form.TableSection.html">LuCI.form.TableSection</a>
1542
1543 </span>
1544 <ul class="members itemMembers">
1545
1546 <span class="subtitle">Members</span>
1547
1548 <li data-name="LuCI.form.TableSection##addbtntitle"><a href="LuCI.form.TableSection.html#addbtntitle">addbtntitle</a></li>
1549
1550 <li data-name="LuCI.form.TableSection##addremove"><a href="LuCI.form.TableSection.html#addremove">addremove</a></li>
1551
1552 <li data-name="LuCI.form.TableSection##anonymous"><a href="LuCI.form.TableSection.html#anonymous">anonymous</a></li>
1553
1554 <li data-name="LuCI.form.TableSection##extedit"><a href="LuCI.form.TableSection.html#extedit">extedit</a></li>
1555
1556 <li data-name="LuCI.form.TableSection##max_cols"><a href="LuCI.form.TableSection.html#max_cols">max_cols</a></li>
1557
1558 <li data-name="LuCI.form.TableSection##modaltitle"><a href="LuCI.form.TableSection.html#modaltitle">modaltitle</a></li>
1559
1560 <li data-name="LuCI.form.TableSection##nodescriptions"><a href="LuCI.form.TableSection.html#nodescriptions">nodescriptions</a></li>
1561
1562 <li data-name="LuCI.form.TableSection##rowcolors"><a href="LuCI.form.TableSection.html#rowcolors">rowcolors</a></li>
1563
1564 <li data-name="LuCI.form.TableSection##sectiontitle"><a href="LuCI.form.TableSection.html#sectiontitle">sectiontitle</a></li>
1565
1566 <li data-name="LuCI.form.TableSection##sortable"><a href="LuCI.form.TableSection.html#sortable">sortable</a></li>
1567
1568 <li data-name="LuCI.form.TableSection##uciconfig"><a href="LuCI.form.TableSection.html#uciconfig">uciconfig</a></li>
1569
1570 <li data-name="LuCI.form.TableSection#addbtntitle"><a href="LuCI.form.TableSection.html#addbtntitle">addbtntitle</a></li>
1571
1572 <li data-name="LuCI.form.TableSection#addremove"><a href="LuCI.form.TableSection.html#addremove">addremove</a></li>
1573
1574 <li data-name="LuCI.form.TableSection#anonymous"><a href="LuCI.form.TableSection.html#anonymous">anonymous</a></li>
1575
1576 <li data-name="LuCI.form.TableSection#parentoption"><a href="LuCI.form.TableSection.html#parentoption">parentoption</a></li>
1577
1578 <li data-name="LuCI.form.TableSection#tabbed"><a href="LuCI.form.TableSection.html#tabbed">tabbed</a></li>
1579
1580 <li data-name="LuCI.form.TableSection#tooltip"><a href="LuCI.form.TableSection.html#tooltip">tooltip</a></li>
1581
1582 <li data-name="LuCI.form.TableSection#tooltipicon"><a href="LuCI.form.TableSection.html#tooltipicon">tooltipicon</a></li>
1583
1584 <li data-name="LuCI.form.TableSection#uciconfig"><a href="LuCI.form.TableSection.html#uciconfig">uciconfig</a></li>
1585
1586 </ul>
1587 <ul class="typedefs itemMembers">
1588
1589 </ul>
1590 <ul class="typedefs itemMembers">
1591
1592 </ul>
1593 <ul class="methods itemMembers">
1594
1595 <span class="subtitle">Methods</span>
1596
1597 <li data-name="LuCI.form.TableSection#addModalOptions"><a href="LuCI.form.TableSection.html#addModalOptions">addModalOptions</a></li>
1598
1599 <li data-name="LuCI.form.TableSection#append"><a href="LuCI.form.TableSection.html#append">append</a></li>
1600
1601 <li data-name="LuCI.form.TableSection#cfgvalue"><a href="LuCI.form.TableSection.html#cfgvalue">cfgvalue</a></li>
1602
1603 <li data-name="LuCI.form.TableSection#filter"><a href="LuCI.form.TableSection.html#filter">filter</a></li>
1604
1605 <li data-name="LuCI.form.TableSection#formvalue"><a href="LuCI.form.TableSection.html#formvalue">formvalue</a></li>
1606
1607 <li data-name="LuCI.form.TableSection#getOption"><a href="LuCI.form.TableSection.html#getOption">getOption</a></li>
1608
1609 <li data-name="LuCI.form.TableSection#getUIElement"><a href="LuCI.form.TableSection.html#getUIElement">getUIElement</a></li>
1610
1611 <li data-name="LuCI.form.TableSection#load"><a href="LuCI.form.TableSection.html#load">load</a></li>
1612
1613 <li data-name="LuCI.form.TableSection#option"><a href="LuCI.form.TableSection.html#option">option</a></li>
1614
1615 <li data-name="LuCI.form.TableSection#parse"><a href="LuCI.form.TableSection.html#parse">parse</a></li>
1616
1617 <li data-name="LuCI.form.TableSection#stripTags"><a href="LuCI.form.TableSection.html#stripTags">stripTags</a></li>
1618
1619 <li data-name="LuCI.form.TableSection#tab"><a href="LuCI.form.TableSection.html#tab">tab</a></li>
1620
1621 <li data-name="LuCI.form.TableSection#taboption"><a href="LuCI.form.TableSection.html#taboption">taboption</a></li>
1622
1623 <li data-name="LuCI.form.TableSection#titleFn"><a href="LuCI.form.TableSection.html#titleFn">titleFn</a></li>
1624
1625 </ul>
1626 <ul class="events itemMembers">
1627
1628 </ul>
1629 </li>
1630
1631 <li class="item" data-name="LuCI.form.TextValue">
1632 <span class="title">
1633 <a href="LuCI.form.TextValue.html">LuCI.form.TextValue</a>
1634
1635 </span>
1636 <ul class="members itemMembers">
1637
1638 <span class="subtitle">Members</span>
1639
1640 <li data-name="LuCI.form.TextValue##cols"><a href="LuCI.form.TextValue.html#cols">cols</a></li>
1641
1642 <li data-name="LuCI.form.TextValue##monospace"><a href="LuCI.form.TextValue.html#monospace">monospace</a></li>
1643
1644 <li data-name="LuCI.form.TextValue##rows"><a href="LuCI.form.TextValue.html#rows">rows</a></li>
1645
1646 <li data-name="LuCI.form.TextValue##wrap"><a href="LuCI.form.TextValue.html#wrap">wrap</a></li>
1647
1648 <li data-name="LuCI.form.TextValue#datatype"><a href="LuCI.form.TextValue.html#datatype">datatype</a></li>
1649
1650 <li data-name="LuCI.form.TextValue#default"><a href="LuCI.form.TextValue.html#default">default</a></li>
1651
1652 <li data-name="LuCI.form.TextValue#editable"><a href="LuCI.form.TextValue.html#editable">editable</a></li>
1653
1654 <li data-name="LuCI.form.TextValue#modalonly"><a href="LuCI.form.TextValue.html#modalonly">modalonly</a></li>
1655
1656 <li data-name="LuCI.form.TextValue#onchange"><a href="LuCI.form.TextValue.html#onchange">onchange</a></li>
1657
1658 <li data-name="LuCI.form.TextValue#optional"><a href="LuCI.form.TextValue.html#optional">optional</a></li>
1659
1660 <li data-name="LuCI.form.TextValue#password"><a href="LuCI.form.TextValue.html#password">password</a></li>
1661
1662 <li data-name="LuCI.form.TextValue#placeholder"><a href="LuCI.form.TextValue.html#placeholder">placeholder</a></li>
1663
1664 <li data-name="LuCI.form.TextValue#readonly"><a href="LuCI.form.TextValue.html#readonly">readonly</a></li>
1665
1666 <li data-name="LuCI.form.TextValue#retain"><a href="LuCI.form.TextValue.html#retain">retain</a></li>
1667
1668 <li data-name="LuCI.form.TextValue#rmempty"><a href="LuCI.form.TextValue.html#rmempty">rmempty</a></li>
1669
1670 <li data-name="LuCI.form.TextValue#uciconfig"><a href="LuCI.form.TextValue.html#uciconfig">uciconfig</a></li>
1671
1672 <li data-name="LuCI.form.TextValue#ucioption"><a href="LuCI.form.TextValue.html#ucioption">ucioption</a></li>
1673
1674 <li data-name="LuCI.form.TextValue#ucisection"><a href="LuCI.form.TextValue.html#ucisection">ucisection</a></li>
1675
1676 <li data-name="LuCI.form.TextValue#validate"><a href="LuCI.form.TextValue.html#validate">validate</a></li>
1677
1678 <li data-name="LuCI.form.TextValue#width"><a href="LuCI.form.TextValue.html#width">width</a></li>
1679
1680 </ul>
1681 <ul class="typedefs itemMembers">
1682
1683 </ul>
1684 <ul class="typedefs itemMembers">
1685
1686 </ul>
1687 <ul class="methods itemMembers">
1688
1689 <span class="subtitle">Methods</span>
1690
1691 <li data-name="LuCI.form.TextValue#append"><a href="LuCI.form.TextValue.html#append">append</a></li>
1692
1693 <li data-name="LuCI.form.TextValue#cbid"><a href="LuCI.form.TextValue.html#cbid">cbid</a></li>
1694
1695 <li data-name="LuCI.form.TextValue#cfgvalue"><a href="LuCI.form.TextValue.html#cfgvalue">cfgvalue</a></li>
1696
1697 <li data-name="LuCI.form.TextValue#depends"><a href="LuCI.form.TextValue.html#depends">depends</a></li>
1698
1699 <li data-name="LuCI.form.TextValue#formvalue"><a href="LuCI.form.TextValue.html#formvalue">formvalue</a></li>
1700
1701 <li data-name="LuCI.form.TextValue#getUIElement"><a href="LuCI.form.TextValue.html#getUIElement">getUIElement</a></li>
1702
1703 <li data-name="LuCI.form.TextValue#getValidationError"><a href="LuCI.form.TextValue.html#getValidationError">getValidationError</a></li>
1704
1705 <li data-name="LuCI.form.TextValue#isActive"><a href="LuCI.form.TextValue.html#isActive">isActive</a></li>
1706
1707 <li data-name="LuCI.form.TextValue#isValid"><a href="LuCI.form.TextValue.html#isValid">isValid</a></li>
1708
1709 <li data-name="LuCI.form.TextValue#load"><a href="LuCI.form.TextValue.html#load">load</a></li>
1710
1711 <li data-name="LuCI.form.TextValue#parse"><a href="LuCI.form.TextValue.html#parse">parse</a></li>
1712
1713 <li data-name="LuCI.form.TextValue#remove"><a href="LuCI.form.TextValue.html#remove">remove</a></li>
1714
1715 <li data-name="LuCI.form.TextValue#stripTags"><a href="LuCI.form.TextValue.html#stripTags">stripTags</a></li>
1716
1717 <li data-name="LuCI.form.TextValue#textvalue"><a href="LuCI.form.TextValue.html#textvalue">textvalue</a></li>
1718
1719 <li data-name="LuCI.form.TextValue#titleFn"><a href="LuCI.form.TextValue.html#titleFn">titleFn</a></li>
1720
1721 <li data-name="LuCI.form.TextValue#write"><a href="LuCI.form.TextValue.html#write">write</a></li>
1722
1723 </ul>
1724 <ul class="events itemMembers">
1725
1726 </ul>
1727 </li>
1728
1729 <li class="item" data-name="LuCI.form.TypedSection">
1730 <span class="title">
1731 <a href="LuCI.form.TypedSection.html">LuCI.form.TypedSection</a>
1732
1733 </span>
1734 <ul class="members itemMembers">
1735
1736 <span class="subtitle">Members</span>
1737
1738 <li data-name="LuCI.form.TypedSection##addbtntitle"><a href="LuCI.form.TypedSection.html#addbtntitle">addbtntitle</a></li>
1739
1740 <li data-name="LuCI.form.TypedSection##addremove"><a href="LuCI.form.TypedSection.html#addremove">addremove</a></li>
1741
1742 <li data-name="LuCI.form.TypedSection##anonymous"><a href="LuCI.form.TypedSection.html#anonymous">anonymous</a></li>
1743
1744 <li data-name="LuCI.form.TypedSection##tabbed"><a href="LuCI.form.TypedSection.html#tabbed">tabbed</a></li>
1745
1746 <li data-name="LuCI.form.TypedSection##tooltip"><a href="LuCI.form.TypedSection.html#tooltip">tooltip</a></li>
1747
1748 <li data-name="LuCI.form.TypedSection##tooltipicon"><a href="LuCI.form.TypedSection.html#tooltipicon">tooltipicon</a></li>
1749
1750 <li data-name="LuCI.form.TypedSection##uciconfig"><a href="LuCI.form.TypedSection.html#uciconfig">uciconfig</a></li>
1751
1752 <li data-name="LuCI.form.TypedSection#parentoption"><a href="LuCI.form.TypedSection.html#parentoption">parentoption</a></li>
1753
1754 </ul>
1755 <ul class="typedefs itemMembers">
1756
1757 </ul>
1758 <ul class="typedefs itemMembers">
1759
1760 </ul>
1761 <ul class="methods itemMembers">
1762
1763 <span class="subtitle">Methods</span>
1764
1765 <li data-name="LuCI.form.TypedSection#append"><a href="LuCI.form.TypedSection.html#append">append</a></li>
1766
1767 <li data-name="LuCI.form.TypedSection#cfgsections"><a href="LuCI.form.TypedSection.html#cfgsections">cfgsections</a></li>
1768
1769 <li data-name="LuCI.form.TypedSection#cfgvalue"><a href="LuCI.form.TypedSection.html#cfgvalue">cfgvalue</a></li>
1770
1771 <li data-name="LuCI.form.TypedSection#filter"><a href="LuCI.form.TypedSection.html#filter">filter</a></li>
1772
1773 <li data-name="LuCI.form.TypedSection#formvalue"><a href="LuCI.form.TypedSection.html#formvalue">formvalue</a></li>
1774
1775 <li data-name="LuCI.form.TypedSection#getOption"><a href="LuCI.form.TypedSection.html#getOption">getOption</a></li>
1776
1777 <li data-name="LuCI.form.TypedSection#getUIElement"><a href="LuCI.form.TypedSection.html#getUIElement">getUIElement</a></li>
1778
1779 <li data-name="LuCI.form.TypedSection#load"><a href="LuCI.form.TypedSection.html#load">load</a></li>
1780
1781 <li data-name="LuCI.form.TypedSection#option"><a href="LuCI.form.TypedSection.html#option">option</a></li>
1782
1783 <li data-name="LuCI.form.TypedSection#parse"><a href="LuCI.form.TypedSection.html#parse">parse</a></li>
1784
1785 <li data-name="LuCI.form.TypedSection#render"><a href="LuCI.form.TypedSection.html#render">render</a></li>
1786
1787 <li data-name="LuCI.form.TypedSection#stripTags"><a href="LuCI.form.TypedSection.html#stripTags">stripTags</a></li>
1788
1789 <li data-name="LuCI.form.TypedSection#tab"><a href="LuCI.form.TypedSection.html#tab">tab</a></li>
1790
1791 <li data-name="LuCI.form.TypedSection#taboption"><a href="LuCI.form.TypedSection.html#taboption">taboption</a></li>
1792
1793 <li data-name="LuCI.form.TypedSection#titleFn"><a href="LuCI.form.TypedSection.html#titleFn">titleFn</a></li>
1794
1795 </ul>
1796 <ul class="events itemMembers">
1797
1798 </ul>
1799 </li>
1800
1801 <li class="item" data-name="LuCI.form.Value">
1802 <span class="title">
1803 <a href="LuCI.form.Value.html">LuCI.form.Value</a>
1804
1805 </span>
1806 <ul class="members itemMembers">
1807
1808 <span class="subtitle">Members</span>
1809
1810 <li data-name="LuCI.form.Value##password"><a href="LuCI.form.Value.html#password">password</a></li>
1811
1812 <li data-name="LuCI.form.Value##placeholder"><a href="LuCI.form.Value.html#placeholder">placeholder</a></li>
1813
1814 <li data-name="LuCI.form.Value#datatype"><a href="LuCI.form.Value.html#datatype">datatype</a></li>
1815
1816 <li data-name="LuCI.form.Value#default"><a href="LuCI.form.Value.html#default">default</a></li>
1817
1818 <li data-name="LuCI.form.Value#editable"><a href="LuCI.form.Value.html#editable">editable</a></li>
1819
1820 <li data-name="LuCI.form.Value#modalonly"><a href="LuCI.form.Value.html#modalonly">modalonly</a></li>
1821
1822 <li data-name="LuCI.form.Value#onchange"><a href="LuCI.form.Value.html#onchange">onchange</a></li>
1823
1824 <li data-name="LuCI.form.Value#optional"><a href="LuCI.form.Value.html#optional">optional</a></li>
1825
1826 <li data-name="LuCI.form.Value#readonly"><a href="LuCI.form.Value.html#readonly">readonly</a></li>
1827
1828 <li data-name="LuCI.form.Value#retain"><a href="LuCI.form.Value.html#retain">retain</a></li>
1829
1830 <li data-name="LuCI.form.Value#rmempty"><a href="LuCI.form.Value.html#rmempty">rmempty</a></li>
1831
1832 <li data-name="LuCI.form.Value#uciconfig"><a href="LuCI.form.Value.html#uciconfig">uciconfig</a></li>
1833
1834 <li data-name="LuCI.form.Value#ucioption"><a href="LuCI.form.Value.html#ucioption">ucioption</a></li>
1835
1836 <li data-name="LuCI.form.Value#ucisection"><a href="LuCI.form.Value.html#ucisection">ucisection</a></li>
1837
1838 <li data-name="LuCI.form.Value#validate"><a href="LuCI.form.Value.html#validate">validate</a></li>
1839
1840 <li data-name="LuCI.form.Value#width"><a href="LuCI.form.Value.html#width">width</a></li>
1841
1842 </ul>
1843 <ul class="typedefs itemMembers">
1844
1845 </ul>
1846 <ul class="typedefs itemMembers">
1847
1848 </ul>
1849 <ul class="methods itemMembers">
1850
1851 <span class="subtitle">Methods</span>
1852
1853 <li data-name="LuCI.form.Value#append"><a href="LuCI.form.Value.html#append">append</a></li>
1854
1855 <li data-name="LuCI.form.Value#cbid"><a href="LuCI.form.Value.html#cbid">cbid</a></li>
1856
1857 <li data-name="LuCI.form.Value#cfgvalue"><a href="LuCI.form.Value.html#cfgvalue">cfgvalue</a></li>
1858
1859 <li data-name="LuCI.form.Value#depends"><a href="LuCI.form.Value.html#depends">depends</a></li>
1860
1861 <li data-name="LuCI.form.Value#formvalue"><a href="LuCI.form.Value.html#formvalue">formvalue</a></li>
1862
1863 <li data-name="LuCI.form.Value#getUIElement"><a href="LuCI.form.Value.html#getUIElement">getUIElement</a></li>
1864
1865 <li data-name="LuCI.form.Value#getValidationError"><a href="LuCI.form.Value.html#getValidationError">getValidationError</a></li>
1866
1867 <li data-name="LuCI.form.Value#isActive"><a href="LuCI.form.Value.html#isActive">isActive</a></li>
1868
1869 <li data-name="LuCI.form.Value#isValid"><a href="LuCI.form.Value.html#isValid">isValid</a></li>
1870
1871 <li data-name="LuCI.form.Value#load"><a href="LuCI.form.Value.html#load">load</a></li>
1872
1873 <li data-name="LuCI.form.Value#parse"><a href="LuCI.form.Value.html#parse">parse</a></li>
1874
1875 <li data-name="LuCI.form.Value#remove"><a href="LuCI.form.Value.html#remove">remove</a></li>
1876
1877 <li data-name="LuCI.form.Value#render"><a href="LuCI.form.Value.html#render">render</a></li>
1878
1879 <li data-name="LuCI.form.Value#stripTags"><a href="LuCI.form.Value.html#stripTags">stripTags</a></li>
1880
1881 <li data-name="LuCI.form.Value#textvalue"><a href="LuCI.form.Value.html#textvalue">textvalue</a></li>
1882
1883 <li data-name="LuCI.form.Value#titleFn"><a href="LuCI.form.Value.html#titleFn">titleFn</a></li>
1884
1885 <li data-name="LuCI.form.Value#value"><a href="LuCI.form.Value.html#value">value</a></li>
1886
1887 <li data-name="LuCI.form.Value#write"><a href="LuCI.form.Value.html#write">write</a></li>
1888
1889 </ul>
1890 <ul class="events itemMembers">
1891
1892 </ul>
1893 </li>
1894
1895 <li class="item" data-name="LuCI.fs">
1896 <span class="title">
1897 <a href="LuCI.fs.html">LuCI.fs</a>
1898
1899 </span>
1900 <ul class="members itemMembers">
1901
1902 </ul>
1903 <ul class="typedefs itemMembers">
1904
1905 <span class="subtitle">Typedefs</span>
1906
1907 <li data-name="LuCI.fs.FileExecResult"><a href="LuCI.fs.html#.FileExecResult">FileExecResult</a></li>
1908
1909 <li data-name="LuCI.fs.FileStatEntry"><a href="LuCI.fs.html#.FileStatEntry">FileStatEntry</a></li>
1910
1911 </ul>
1912 <ul class="typedefs itemMembers">
1913
1914 </ul>
1915 <ul class="methods itemMembers">
1916
1917 <span class="subtitle">Methods</span>
1918
1919 <li data-name="LuCI.fs#exec"><a href="LuCI.fs.html#exec">exec</a></li>
1920
1921 <li data-name="LuCI.fs#exec_direct"><a href="LuCI.fs.html#exec_direct">exec_direct</a></li>
1922
1923 <li data-name="LuCI.fs#lines"><a href="LuCI.fs.html#lines">lines</a></li>
1924
1925 <li data-name="LuCI.fs#list"><a href="LuCI.fs.html#list">list</a></li>
1926
1927 <li data-name="LuCI.fs#read"><a href="LuCI.fs.html#read">read</a></li>
1928
1929 <li data-name="LuCI.fs#read_direct"><a href="LuCI.fs.html#read_direct">read_direct</a></li>
1930
1931 <li data-name="LuCI.fs#remove"><a href="LuCI.fs.html#remove">remove</a></li>
1932
1933 <li data-name="LuCI.fs#stat"><a href="LuCI.fs.html#stat">stat</a></li>
1934
1935 <li data-name="LuCI.fs#trimmed"><a href="LuCI.fs.html#trimmed">trimmed</a></li>
1936
1937 <li data-name="LuCI.fs#write"><a href="LuCI.fs.html#write">write</a></li>
1938
1939 </ul>
1940 <ul class="events itemMembers">
1941
1942 </ul>
1943 </li>
1944
1945 <li class="item" data-name="LuCI.headers">
1946 <span class="title">
1947 <a href="LuCI.headers.html">LuCI.headers</a>
1948
1949 </span>
1950 <ul class="members itemMembers">
1951
1952 </ul>
1953 <ul class="typedefs itemMembers">
1954
1955 </ul>
1956 <ul class="typedefs itemMembers">
1957
1958 </ul>
1959 <ul class="methods itemMembers">
1960
1961 <span class="subtitle">Methods</span>
1962
1963 <li data-name="LuCI.headers#get"><a href="LuCI.headers.html#get">get</a></li>
1964
1965 <li data-name="LuCI.headers#has"><a href="LuCI.headers.html#has">has</a></li>
1966
1967 </ul>
1968 <ul class="events itemMembers">
1969
1970 </ul>
1971 </li>
1972
1973 <li class="item" data-name="LuCI.network">
1974 <span class="title">
1975 <a href="LuCI.network.html">LuCI.network</a>
1976
1977 </span>
1978 <ul class="members itemMembers">
1979
1980 </ul>
1981 <ul class="typedefs itemMembers">
1982
1983 <span class="subtitle">Typedefs</span>
1984
1985 <li data-name="LuCI.network.SwitchTopology"><a href="LuCI.network.html#.SwitchTopology">SwitchTopology</a></li>
1986
1987 <li data-name="LuCI.network.WifiEncryption"><a href="LuCI.network.html#.WifiEncryption">WifiEncryption</a></li>
1988
1989 <li data-name="LuCI.network.WifiPeerEntry"><a href="LuCI.network.html#.WifiPeerEntry">WifiPeerEntry</a></li>
1990
1991 <li data-name="LuCI.network.WifiRateEntry"><a href="LuCI.network.html#.WifiRateEntry">WifiRateEntry</a></li>
1992
1993 <li data-name="LuCI.network.WifiScanResult"><a href="LuCI.network.html#.WifiScanResult">WifiScanResult</a></li>
1994
1995 </ul>
1996 <ul class="typedefs itemMembers">
1997
1998 </ul>
1999 <ul class="methods itemMembers">
2000
2001 <span class="subtitle">Methods</span>
2002
2003 <li data-name="LuCI.network#addNetwork"><a href="LuCI.network.html#addNetwork">addNetwork</a></li>
2004
2005 <li data-name="LuCI.network#addWifiNetwork"><a href="LuCI.network.html#addWifiNetwork">addWifiNetwork</a></li>
2006
2007 <li data-name="LuCI.network#deleteNetwork"><a href="LuCI.network.html#deleteNetwork">deleteNetwork</a></li>
2008
2009 <li data-name="LuCI.network#deleteWifiNetwork"><a href="LuCI.network.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
2010
2011 <li data-name="LuCI.network#flushCache"><a href="LuCI.network.html#flushCache">flushCache</a></li>
2012
2013 <li data-name="LuCI.network#formatWifiEncryption"><a href="LuCI.network.html#formatWifiEncryption">formatWifiEncryption</a></li>
2014
2015 <li data-name="LuCI.network#getDevice"><a href="LuCI.network.html#getDevice">getDevice</a></li>
2016
2017 <li data-name="LuCI.network#getDevices"><a href="LuCI.network.html#getDevices">getDevices</a></li>
2018
2019 <li data-name="LuCI.network#getDSLModemType"><a href="LuCI.network.html#getDSLModemType">getDSLModemType</a></li>
2020
2021 <li data-name="LuCI.network#getHostHints"><a href="LuCI.network.html#getHostHints">getHostHints</a></li>
2022
2023 <li data-name="LuCI.network#getIfnameOf"><a href="LuCI.network.html#getIfnameOf">getIfnameOf</a></li>
2024
2025 <li data-name="LuCI.network#getNetwork"><a href="LuCI.network.html#getNetwork">getNetwork</a></li>
2026
2027 <li data-name="LuCI.network#getNetworks"><a href="LuCI.network.html#getNetworks">getNetworks</a></li>
2028
2029 <li data-name="LuCI.network#getProtocol"><a href="LuCI.network.html#getProtocol">getProtocol</a></li>
2030
2031 <li data-name="LuCI.network#getProtocols"><a href="LuCI.network.html#getProtocols">getProtocols</a></li>
2032
2033 <li data-name="LuCI.network#getSwitchTopologies"><a href="LuCI.network.html#getSwitchTopologies">getSwitchTopologies</a></li>
2034
2035 <li data-name="LuCI.network#getWAN6Networks"><a href="LuCI.network.html#getWAN6Networks">getWAN6Networks</a></li>
2036
2037 <li data-name="LuCI.network#getWANNetworks"><a href="LuCI.network.html#getWANNetworks">getWANNetworks</a></li>
2038
2039 <li data-name="LuCI.network#getWifiDevice"><a href="LuCI.network.html#getWifiDevice">getWifiDevice</a></li>
2040
2041 <li data-name="LuCI.network#getWifiDevices"><a href="LuCI.network.html#getWifiDevices">getWifiDevices</a></li>
2042
2043 <li data-name="LuCI.network#getWifiNetwork"><a href="LuCI.network.html#getWifiNetwork">getWifiNetwork</a></li>
2044
2045 <li data-name="LuCI.network#getWifiNetworks"><a href="LuCI.network.html#getWifiNetworks">getWifiNetworks</a></li>
2046
2047 <li data-name="LuCI.network#isIgnoredDevice"><a href="LuCI.network.html#isIgnoredDevice">isIgnoredDevice</a></li>
2048
2049 <li data-name="LuCI.network#maskToPrefix"><a href="LuCI.network.html#maskToPrefix">maskToPrefix</a></li>
2050
2051 <li data-name="LuCI.network#prefixToMask"><a href="LuCI.network.html#prefixToMask">prefixToMask</a></li>
2052
2053 <li data-name="LuCI.network#registerErrorCode"><a href="LuCI.network.html#registerErrorCode">registerErrorCode</a></li>
2054
2055 <li data-name="LuCI.network#registerPatternVirtual"><a href="LuCI.network.html#registerPatternVirtual">registerPatternVirtual</a></li>
2056
2057 <li data-name="LuCI.network#registerProtocol"><a href="LuCI.network.html#registerProtocol">registerProtocol</a></li>
2058
2059 <li data-name="LuCI.network#renameNetwork"><a href="LuCI.network.html#renameNetwork">renameNetwork</a></li>
2060
2061 </ul>
2062 <ul class="events itemMembers">
2063
2064 </ul>
2065 </li>
2066
2067 <li class="item" data-name="LuCI.network.Device">
2068 <span class="title">
2069 <a href="LuCI.network.Device.html">LuCI.network.Device</a>
2070
2071 </span>
2072 <ul class="members itemMembers">
2073
2074 </ul>
2075 <ul class="typedefs itemMembers">
2076
2077 </ul>
2078 <ul class="typedefs itemMembers">
2079
2080 </ul>
2081 <ul class="methods itemMembers">
2082
2083 <span class="subtitle">Methods</span>
2084
2085 <li data-name="LuCI.network.Device#getBridgeID"><a href="LuCI.network.Device.html#getBridgeID">getBridgeID</a></li>
2086
2087 <li data-name="LuCI.network.Device#getBridgeSTP"><a href="LuCI.network.Device.html#getBridgeSTP">getBridgeSTP</a></li>
2088
2089 <li data-name="LuCI.network.Device#getCarrier"><a href="LuCI.network.Device.html#getCarrier">getCarrier</a></li>
2090
2091 <li data-name="LuCI.network.Device#getDuplex"><a href="LuCI.network.Device.html#getDuplex">getDuplex</a></li>
2092
2093 <li data-name="LuCI.network.Device#getI18n"><a href="LuCI.network.Device.html#getI18n">getI18n</a></li>
2094
2095 <li data-name="LuCI.network.Device#getIP6Addrs"><a href="LuCI.network.Device.html#getIP6Addrs">getIP6Addrs</a></li>
2096
2097 <li data-name="LuCI.network.Device#getIPAddrs"><a href="LuCI.network.Device.html#getIPAddrs">getIPAddrs</a></li>
2098
2099 <li data-name="LuCI.network.Device#getMAC"><a href="LuCI.network.Device.html#getMAC">getMAC</a></li>
2100
2101 <li data-name="LuCI.network.Device#getMTU"><a href="LuCI.network.Device.html#getMTU">getMTU</a></li>
2102
2103 <li data-name="LuCI.network.Device#getName"><a href="LuCI.network.Device.html#getName">getName</a></li>
2104
2105 <li data-name="LuCI.network.Device#getNetwork"><a href="LuCI.network.Device.html#getNetwork">getNetwork</a></li>
2106
2107 <li data-name="LuCI.network.Device#getNetworks"><a href="LuCI.network.Device.html#getNetworks">getNetworks</a></li>
2108
2109 <li data-name="LuCI.network.Device#getParent"><a href="LuCI.network.Device.html#getParent">getParent</a></li>
2110
2111 <li data-name="LuCI.network.Device#getPorts"><a href="LuCI.network.Device.html#getPorts">getPorts</a></li>
2112
2113 <li data-name="LuCI.network.Device#getRXBytes"><a href="LuCI.network.Device.html#getRXBytes">getRXBytes</a></li>
2114
2115 <li data-name="LuCI.network.Device#getRXPackets"><a href="LuCI.network.Device.html#getRXPackets">getRXPackets</a></li>
2116
2117 <li data-name="LuCI.network.Device#getShortName"><a href="LuCI.network.Device.html#getShortName">getShortName</a></li>
2118
2119 <li data-name="LuCI.network.Device#getSpeed"><a href="LuCI.network.Device.html#getSpeed">getSpeed</a></li>
2120
2121 <li data-name="LuCI.network.Device#getTXBytes"><a href="LuCI.network.Device.html#getTXBytes">getTXBytes</a></li>
2122
2123 <li data-name="LuCI.network.Device#getTXPackets"><a href="LuCI.network.Device.html#getTXPackets">getTXPackets</a></li>
2124
2125 <li data-name="LuCI.network.Device#getType"><a href="LuCI.network.Device.html#getType">getType</a></li>
2126
2127 <li data-name="LuCI.network.Device#getTypeI18n"><a href="LuCI.network.Device.html#getTypeI18n">getTypeI18n</a></li>
2128
2129 <li data-name="LuCI.network.Device#getWifiNetwork"><a href="LuCI.network.Device.html#getWifiNetwork">getWifiNetwork</a></li>
2130
2131 <li data-name="LuCI.network.Device#isBridge"><a href="LuCI.network.Device.html#isBridge">isBridge</a></li>
2132
2133 <li data-name="LuCI.network.Device#isBridgePort"><a href="LuCI.network.Device.html#isBridgePort">isBridgePort</a></li>
2134
2135 <li data-name="LuCI.network.Device#isUp"><a href="LuCI.network.Device.html#isUp">isUp</a></li>
2136
2137 </ul>
2138 <ul class="events itemMembers">
2139
2140 </ul>
2141 </li>
2142
2143 <li class="item" data-name="LuCI.network.Hosts">
2144 <span class="title">
2145 <a href="LuCI.network.Hosts.html">LuCI.network.Hosts</a>
2146
2147 </span>
2148 <ul class="members itemMembers">
2149
2150 </ul>
2151 <ul class="typedefs itemMembers">
2152
2153 </ul>
2154 <ul class="typedefs itemMembers">
2155
2156 </ul>
2157 <ul class="methods itemMembers">
2158
2159 <span class="subtitle">Methods</span>
2160
2161 <li data-name="LuCI.network.Hosts#getHostnameByIP6Addr"><a href="LuCI.network.Hosts.html#getHostnameByIP6Addr">getHostnameByIP6Addr</a></li>
2162
2163 <li data-name="LuCI.network.Hosts#getHostnameByIPAddr"><a href="LuCI.network.Hosts.html#getHostnameByIPAddr">getHostnameByIPAddr</a></li>
2164
2165 <li data-name="LuCI.network.Hosts#getHostnameByMACAddr"><a href="LuCI.network.Hosts.html#getHostnameByMACAddr">getHostnameByMACAddr</a></li>
2166
2167 <li data-name="LuCI.network.Hosts#getIP6AddrByMACAddr"><a href="LuCI.network.Hosts.html#getIP6AddrByMACAddr">getIP6AddrByMACAddr</a></li>
2168
2169 <li data-name="LuCI.network.Hosts#getIPAddrByMACAddr"><a href="LuCI.network.Hosts.html#getIPAddrByMACAddr">getIPAddrByMACAddr</a></li>
2170
2171 <li data-name="LuCI.network.Hosts#getMACAddrByIP6Addr"><a href="LuCI.network.Hosts.html#getMACAddrByIP6Addr">getMACAddrByIP6Addr</a></li>
2172
2173 <li data-name="LuCI.network.Hosts#getMACAddrByIPAddr"><a href="LuCI.network.Hosts.html#getMACAddrByIPAddr">getMACAddrByIPAddr</a></li>
2174
2175 <li data-name="LuCI.network.Hosts#getMACHints"><a href="LuCI.network.Hosts.html#getMACHints">getMACHints</a></li>
2176
2177 </ul>
2178 <ul class="events itemMembers">
2179
2180 </ul>
2181 </li>
2182
2183 <li class="item" data-name="LuCI.network.Protocol">
2184 <span class="title">
2185 <a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>
2186
2187 </span>
2188 <ul class="members itemMembers">
2189
2190 </ul>
2191 <ul class="typedefs itemMembers">
2192
2193 </ul>
2194 <ul class="typedefs itemMembers">
2195
2196 </ul>
2197 <ul class="methods itemMembers">
2198
2199 <span class="subtitle">Methods</span>
2200
2201 <li data-name="LuCI.network.Protocol#addDevice"><a href="LuCI.network.Protocol.html#addDevice">addDevice</a></li>
2202
2203 <li data-name="LuCI.network.Protocol#containsDevice"><a href="LuCI.network.Protocol.html#containsDevice">containsDevice</a></li>
2204
2205 <li data-name="LuCI.network.Protocol#deleteConfiguration"><a href="LuCI.network.Protocol.html#deleteConfiguration">deleteConfiguration</a></li>
2206
2207 <li data-name="LuCI.network.Protocol#deleteDevice"><a href="LuCI.network.Protocol.html#deleteDevice">deleteDevice</a></li>
2208
2209 <li data-name="LuCI.network.Protocol#get"><a href="LuCI.network.Protocol.html#get">get</a></li>
2210
2211 <li data-name="LuCI.network.Protocol#getDevice"><a href="LuCI.network.Protocol.html#getDevice">getDevice</a></li>
2212
2213 <li data-name="LuCI.network.Protocol#getDevices"><a href="LuCI.network.Protocol.html#getDevices">getDevices</a></li>
2214
2215 <li data-name="LuCI.network.Protocol#getDNS6Addrs"><a href="LuCI.network.Protocol.html#getDNS6Addrs">getDNS6Addrs</a></li>
2216
2217 <li data-name="LuCI.network.Protocol#getDNSAddrs"><a href="LuCI.network.Protocol.html#getDNSAddrs">getDNSAddrs</a></li>
2218
2219 <li data-name="LuCI.network.Protocol#getErrors"><a href="LuCI.network.Protocol.html#getErrors">getErrors</a></li>
2220
2221 <li data-name="LuCI.network.Protocol#getExpiry"><a href="LuCI.network.Protocol.html#getExpiry">getExpiry</a></li>
2222
2223 <li data-name="LuCI.network.Protocol#getGateway6Addr"><a href="LuCI.network.Protocol.html#getGateway6Addr">getGateway6Addr</a></li>
2224
2225 <li data-name="LuCI.network.Protocol#getGatewayAddr"><a href="LuCI.network.Protocol.html#getGatewayAddr">getGatewayAddr</a></li>
2226
2227 <li data-name="LuCI.network.Protocol#getI18n"><a href="LuCI.network.Protocol.html#getI18n">getI18n</a></li>
2228
2229 <li data-name="LuCI.network.Protocol#getIfname"><a href="LuCI.network.Protocol.html#getIfname">getIfname</a></li>
2230
2231 <li data-name="LuCI.network.Protocol#getIP6Addr"><a href="LuCI.network.Protocol.html#getIP6Addr">getIP6Addr</a></li>
2232
2233 <li data-name="LuCI.network.Protocol#getIP6Addrs"><a href="LuCI.network.Protocol.html#getIP6Addrs">getIP6Addrs</a></li>
2234
2235 <li data-name="LuCI.network.Protocol#getIP6Prefix"><a href="LuCI.network.Protocol.html#getIP6Prefix">getIP6Prefix</a></li>
2236
2237 <li data-name="LuCI.network.Protocol#getIPAddr"><a href="LuCI.network.Protocol.html#getIPAddr">getIPAddr</a></li>
2238
2239 <li data-name="LuCI.network.Protocol#getIPAddrs"><a href="LuCI.network.Protocol.html#getIPAddrs">getIPAddrs</a></li>
2240
2241 <li data-name="LuCI.network.Protocol#getL2Device"><a href="LuCI.network.Protocol.html#getL2Device">getL2Device</a></li>
2242
2243 <li data-name="LuCI.network.Protocol#getL3Device"><a href="LuCI.network.Protocol.html#getL3Device">getL3Device</a></li>
2244
2245 <li data-name="LuCI.network.Protocol#getMetric"><a href="LuCI.network.Protocol.html#getMetric">getMetric</a></li>
2246
2247 <li data-name="LuCI.network.Protocol#getName"><a href="LuCI.network.Protocol.html#getName">getName</a></li>
2248
2249 <li data-name="LuCI.network.Protocol#getNetmask"><a href="LuCI.network.Protocol.html#getNetmask">getNetmask</a></li>
2250
2251 <li data-name="LuCI.network.Protocol#getOpkgPackage"><a href="LuCI.network.Protocol.html#getOpkgPackage">getOpkgPackage</a></li>
2252
2253 <li data-name="LuCI.network.Protocol#getProtocol"><a href="LuCI.network.Protocol.html#getProtocol">getProtocol</a></li>
2254
2255 <li data-name="LuCI.network.Protocol#getType"><a href="LuCI.network.Protocol.html#getType">getType</a></li>
2256
2257 <li data-name="LuCI.network.Protocol#getUptime"><a href="LuCI.network.Protocol.html#getUptime">getUptime</a></li>
2258
2259 <li data-name="LuCI.network.Protocol#getZoneName"><a href="LuCI.network.Protocol.html#getZoneName">getZoneName</a></li>
2260
2261 <li data-name="LuCI.network.Protocol#isAlias"><a href="LuCI.network.Protocol.html#isAlias">isAlias</a></li>
2262
2263 <li data-name="LuCI.network.Protocol#isBridge"><a href="LuCI.network.Protocol.html#isBridge">isBridge</a></li>
2264
2265 <li data-name="LuCI.network.Protocol#isCreateable"><a href="LuCI.network.Protocol.html#isCreateable">isCreateable</a></li>
2266
2267 <li data-name="LuCI.network.Protocol#isDynamic"><a href="LuCI.network.Protocol.html#isDynamic">isDynamic</a></li>
2268
2269 <li data-name="LuCI.network.Protocol#isEmpty"><a href="LuCI.network.Protocol.html#isEmpty">isEmpty</a></li>
2270
2271 <li data-name="LuCI.network.Protocol#isFloating"><a href="LuCI.network.Protocol.html#isFloating">isFloating</a></li>
2272
2273 <li data-name="LuCI.network.Protocol#isInstalled"><a href="LuCI.network.Protocol.html#isInstalled">isInstalled</a></li>
2274
2275 <li data-name="LuCI.network.Protocol#isUp"><a href="LuCI.network.Protocol.html#isUp">isUp</a></li>
2276
2277 <li data-name="LuCI.network.Protocol#isVirtual"><a href="LuCI.network.Protocol.html#isVirtual">isVirtual</a></li>
2278
2279 <li data-name="LuCI.network.Protocol#set"><a href="LuCI.network.Protocol.html#set">set</a></li>
2280
2281 </ul>
2282 <ul class="events itemMembers">
2283
2284 </ul>
2285 </li>
2286
2287 <li class="item" data-name="LuCI.network.WifiDevice">
2288 <span class="title">
2289 <a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>
2290
2291 </span>
2292 <ul class="members itemMembers">
2293
2294 </ul>
2295 <ul class="typedefs itemMembers">
2296
2297 </ul>
2298 <ul class="typedefs itemMembers">
2299
2300 </ul>
2301 <ul class="methods itemMembers">
2302
2303 <span class="subtitle">Methods</span>
2304
2305 <li data-name="LuCI.network.WifiDevice#addWifiNetwork"><a href="LuCI.network.WifiDevice.html#addWifiNetwork">addWifiNetwork</a></li>
2306
2307 <li data-name="LuCI.network.WifiDevice#deleteWifiNetwork"><a href="LuCI.network.WifiDevice.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
2308
2309 <li data-name="LuCI.network.WifiDevice#get"><a href="LuCI.network.WifiDevice.html#get">get</a></li>
2310
2311 <li data-name="LuCI.network.WifiDevice#getHTModes"><a href="LuCI.network.WifiDevice.html#getHTModes">getHTModes</a></li>
2312
2313 <li data-name="LuCI.network.WifiDevice#getHWModes"><a href="LuCI.network.WifiDevice.html#getHWModes">getHWModes</a></li>
2314
2315 <li data-name="LuCI.network.WifiDevice#getI18n"><a href="LuCI.network.WifiDevice.html#getI18n">getI18n</a></li>
2316
2317 <li data-name="LuCI.network.WifiDevice#getName"><a href="LuCI.network.WifiDevice.html#getName">getName</a></li>
2318
2319 <li data-name="LuCI.network.WifiDevice#getScanList"><a href="LuCI.network.WifiDevice.html#getScanList">getScanList</a></li>
2320
2321 <li data-name="LuCI.network.WifiDevice#getWifiNetwork"><a href="LuCI.network.WifiDevice.html#getWifiNetwork">getWifiNetwork</a></li>
2322
2323 <li data-name="LuCI.network.WifiDevice#getWifiNetworks"><a href="LuCI.network.WifiDevice.html#getWifiNetworks">getWifiNetworks</a></li>
2324
2325 <li data-name="LuCI.network.WifiDevice#isDisabled"><a href="LuCI.network.WifiDevice.html#isDisabled">isDisabled</a></li>
2326
2327 <li data-name="LuCI.network.WifiDevice#isUp"><a href="LuCI.network.WifiDevice.html#isUp">isUp</a></li>
2328
2329 <li data-name="LuCI.network.WifiDevice#set"><a href="LuCI.network.WifiDevice.html#set">set</a></li>
2330
2331 </ul>
2332 <ul class="events itemMembers">
2333
2334 </ul>
2335 </li>
2336
2337 <li class="item" data-name="LuCI.network.WifiNetwork">
2338 <span class="title">
2339 <a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>
2340
2341 </span>
2342 <ul class="members itemMembers">
2343
2344 </ul>
2345 <ul class="typedefs itemMembers">
2346
2347 </ul>
2348 <ul class="typedefs itemMembers">
2349
2350 </ul>
2351 <ul class="methods itemMembers">
2352
2353 <span class="subtitle">Methods</span>
2354
2355 <li data-name="LuCI.network.WifiNetwork#disconnectClient"><a href="LuCI.network.WifiNetwork.html#disconnectClient">disconnectClient</a></li>
2356
2357 <li data-name="LuCI.network.WifiNetwork#get"><a href="LuCI.network.WifiNetwork.html#get">get</a></li>
2358
2359 <li data-name="LuCI.network.WifiNetwork#getActiveBSSID"><a href="LuCI.network.WifiNetwork.html#getActiveBSSID">getActiveBSSID</a></li>
2360
2361 <li data-name="LuCI.network.WifiNetwork#getActiveEncryption"><a href="LuCI.network.WifiNetwork.html#getActiveEncryption">getActiveEncryption</a></li>
2362
2363 <li data-name="LuCI.network.WifiNetwork#getActiveMode"><a href="LuCI.network.WifiNetwork.html#getActiveMode">getActiveMode</a></li>
2364
2365 <li data-name="LuCI.network.WifiNetwork#getActiveModeI18n"><a href="LuCI.network.WifiNetwork.html#getActiveModeI18n">getActiveModeI18n</a></li>
2366
2367 <li data-name="LuCI.network.WifiNetwork#getActiveSSID"><a href="LuCI.network.WifiNetwork.html#getActiveSSID">getActiveSSID</a></li>
2368
2369 <li data-name="LuCI.network.WifiNetwork#getAssocList"><a href="LuCI.network.WifiNetwork.html#getAssocList">getAssocList</a></li>
2370
2371 <li data-name="LuCI.network.WifiNetwork#getBitRate"><a href="LuCI.network.WifiNetwork.html#getBitRate">getBitRate</a></li>
2372
2373 <li data-name="LuCI.network.WifiNetwork#getBSSID"><a href="LuCI.network.WifiNetwork.html#getBSSID">getBSSID</a></li>
2374
2375 <li data-name="LuCI.network.WifiNetwork#getChannel"><a href="LuCI.network.WifiNetwork.html#getChannel">getChannel</a></li>
2376
2377 <li data-name="LuCI.network.WifiNetwork#getCountryCode"><a href="LuCI.network.WifiNetwork.html#getCountryCode">getCountryCode</a></li>
2378
2379 <li data-name="LuCI.network.WifiNetwork#getDevice"><a href="LuCI.network.WifiNetwork.html#getDevice">getDevice</a></li>
2380
2381 <li data-name="LuCI.network.WifiNetwork#getFrequency"><a href="LuCI.network.WifiNetwork.html#getFrequency">getFrequency</a></li>
2382
2383 <li data-name="LuCI.network.WifiNetwork#getI18n"><a href="LuCI.network.WifiNetwork.html#getI18n">getI18n</a></li>
2384
2385 <li data-name="LuCI.network.WifiNetwork#getID"><a href="LuCI.network.WifiNetwork.html#getID">getID</a></li>
2386
2387 <li data-name="LuCI.network.WifiNetwork#getIfname"><a href="LuCI.network.WifiNetwork.html#getIfname">getIfname</a></li>
2388
2389 <li data-name="LuCI.network.WifiNetwork#getMeshID"><a href="LuCI.network.WifiNetwork.html#getMeshID">getMeshID</a></li>
2390
2391 <li data-name="LuCI.network.WifiNetwork#getMode"><a href="LuCI.network.WifiNetwork.html#getMode">getMode</a></li>
2392
2393 <li data-name="LuCI.network.WifiNetwork#getName"><a href="LuCI.network.WifiNetwork.html#getName">getName</a></li>
2394
2395 <li data-name="LuCI.network.WifiNetwork#getNetwork"><a href="LuCI.network.WifiNetwork.html#getNetwork">getNetwork</a></li>
2396
2397 <li data-name="LuCI.network.WifiNetwork#getNetworkNames"><a href="LuCI.network.WifiNetwork.html#getNetworkNames">getNetworkNames</a></li>
2398
2399 <li data-name="LuCI.network.WifiNetwork#getNetworks"><a href="LuCI.network.WifiNetwork.html#getNetworks">getNetworks</a></li>
2400
2401 <li data-name="LuCI.network.WifiNetwork#getNoise"><a href="LuCI.network.WifiNetwork.html#getNoise">getNoise</a></li>
2402
2403 <li data-name="LuCI.network.WifiNetwork#getShortName"><a href="LuCI.network.WifiNetwork.html#getShortName">getShortName</a></li>
2404
2405 <li data-name="LuCI.network.WifiNetwork#getSignal"><a href="LuCI.network.WifiNetwork.html#getSignal">getSignal</a></li>
2406
2407 <li data-name="LuCI.network.WifiNetwork#getSignalLevel"><a href="LuCI.network.WifiNetwork.html#getSignalLevel">getSignalLevel</a></li>
2408
2409 <li data-name="LuCI.network.WifiNetwork#getSignalPercent"><a href="LuCI.network.WifiNetwork.html#getSignalPercent">getSignalPercent</a></li>
2410
2411 <li data-name="LuCI.network.WifiNetwork#getSSID"><a href="LuCI.network.WifiNetwork.html#getSSID">getSSID</a></li>
2412
2413 <li data-name="LuCI.network.WifiNetwork#getTXPower"><a href="LuCI.network.WifiNetwork.html#getTXPower">getTXPower</a></li>
2414
2415 <li data-name="LuCI.network.WifiNetwork#getTXPowerOffset"><a href="LuCI.network.WifiNetwork.html#getTXPowerOffset">getTXPowerOffset</a></li>
2416
2417 <li data-name="LuCI.network.WifiNetwork#getVlanIfnames"><a href="LuCI.network.WifiNetwork.html#getVlanIfnames">getVlanIfnames</a></li>
2418
2419 <li data-name="LuCI.network.WifiNetwork#getWifiDevice"><a href="LuCI.network.WifiNetwork.html#getWifiDevice">getWifiDevice</a></li>
2420
2421 <li data-name="LuCI.network.WifiNetwork#getWifiDeviceName"><a href="LuCI.network.WifiNetwork.html#getWifiDeviceName">getWifiDeviceName</a></li>
2422
2423 <li data-name="LuCI.network.WifiNetwork#isClientDisconnectSupported"><a href="LuCI.network.WifiNetwork.html#isClientDisconnectSupported">isClientDisconnectSupported</a></li>
2424
2425 <li data-name="LuCI.network.WifiNetwork#isDisabled"><a href="LuCI.network.WifiNetwork.html#isDisabled">isDisabled</a></li>
2426
2427 <li data-name="LuCI.network.WifiNetwork#isUp"><a href="LuCI.network.WifiNetwork.html#isUp">isUp</a></li>
2428
2429 <li data-name="LuCI.network.WifiNetwork#set"><a href="LuCI.network.WifiNetwork.html#set">set</a></li>
2430
2431 </ul>
2432 <ul class="events itemMembers">
2433
2434 </ul>
2435 </li>
2436
2437 <li class="item" data-name="LuCI.poll">
2438 <span class="title">
2439 <a href="LuCI.poll.html">LuCI.poll</a>
2440
2441 </span>
2442 <ul class="members itemMembers">
2443
2444 </ul>
2445 <ul class="typedefs itemMembers">
2446
2447 </ul>
2448 <ul class="typedefs itemMembers">
2449
2450 </ul>
2451 <ul class="methods itemMembers">
2452
2453 <span class="subtitle">Methods</span>
2454
2455 <li data-name="LuCI.poll#active"><a href="LuCI.poll.html#active">active</a></li>
2456
2457 <li data-name="LuCI.poll#add"><a href="LuCI.poll.html#add">add</a></li>
2458
2459 <li data-name="LuCI.poll#remove"><a href="LuCI.poll.html#remove">remove</a></li>
2460
2461 <li data-name="LuCI.poll#start"><a href="LuCI.poll.html#start">start</a></li>
2462
2463 <li data-name="LuCI.poll#stop"><a href="LuCI.poll.html#stop">stop</a></li>
2464
2465 </ul>
2466 <ul class="events itemMembers">
2467
2468 </ul>
2469 </li>
2470
2471 <li class="item" data-name="LuCI.request">
2472 <span class="title">
2473 <a href="LuCI.request.html">LuCI.request</a>
2474
2475 </span>
2476 <ul class="members itemMembers">
2477
2478 </ul>
2479 <ul class="typedefs itemMembers">
2480
2481 <span class="subtitle">Typedefs</span>
2482
2483 <li data-name="LuCI.request.interceptorFn"><a href="LuCI.request.html#.interceptorFn">interceptorFn</a></li>
2484
2485 <li data-name="LuCI.request.RequestOptions"><a href="LuCI.request.html#.RequestOptions">RequestOptions</a></li>
2486
2487 </ul>
2488 <ul class="typedefs itemMembers">
2489
2490 </ul>
2491 <ul class="methods itemMembers">
2492
2493 <span class="subtitle">Methods</span>
2494
2495 <li data-name="LuCI.request#addInterceptor"><a href="LuCI.request.html#addInterceptor">addInterceptor</a></li>
2496
2497 <li data-name="LuCI.request#expandURL"><a href="LuCI.request.html#expandURL">expandURL</a></li>
2498
2499 <li data-name="LuCI.request#get"><a href="LuCI.request.html#get">get</a></li>
2500
2501 <li data-name="LuCI.request#post"><a href="LuCI.request.html#post">post</a></li>
2502
2503 <li data-name="LuCI.request#removeInterceptor"><a href="LuCI.request.html#removeInterceptor">removeInterceptor</a></li>
2504
2505 <li data-name="LuCI.request#request"><a href="LuCI.request.html#request">request</a></li>
2506
2507 </ul>
2508 <ul class="events itemMembers">
2509
2510 </ul>
2511 </li>
2512
2513 <li class="item" data-name="LuCI.request.poll">
2514 <span class="title">
2515 <a href="LuCI.request.poll.html">LuCI.request.poll</a>
2516
2517 </span>
2518 <ul class="members itemMembers">
2519
2520 </ul>
2521 <ul class="typedefs itemMembers">
2522
2523 <span class="subtitle">Typedefs</span>
2524
2525 <li data-name="LuCI.request.poll~callbackFn"><a href="LuCI.request.poll.html#~callbackFn">callbackFn</a></li>
2526
2527 </ul>
2528 <ul class="typedefs itemMembers">
2529
2530 </ul>
2531 <ul class="methods itemMembers">
2532
2533 <span class="subtitle">Methods</span>
2534
2535 <li data-name="LuCI.request.poll#active"><a href="LuCI.request.poll.html#active">active</a></li>
2536
2537 <li data-name="LuCI.request.poll#add"><a href="LuCI.request.poll.html#add">add</a></li>
2538
2539 <li data-name="LuCI.request.poll#remove"><a href="LuCI.request.poll.html#remove">remove</a></li>
2540
2541 <li data-name="LuCI.request.poll#start"><a href="LuCI.request.poll.html#start">start</a></li>
2542
2543 <li data-name="LuCI.request.poll#stop"><a href="LuCI.request.poll.html#stop">stop</a></li>
2544
2545 </ul>
2546 <ul class="events itemMembers">
2547
2548 </ul>
2549 </li>
2550
2551 <li class="item" data-name="LuCI.response">
2552 <span class="title">
2553 <a href="LuCI.response.html">LuCI.response</a>
2554
2555 </span>
2556 <ul class="members itemMembers">
2557
2558 <span class="subtitle">Members</span>
2559
2560 <li data-name="LuCI.response#duration"><a href="LuCI.response.html#duration">duration</a></li>
2561
2562 <li data-name="LuCI.response#headers"><a href="LuCI.response.html#headers">headers</a></li>
2563
2564 <li data-name="LuCI.response#ok"><a href="LuCI.response.html#ok">ok</a></li>
2565
2566 <li data-name="LuCI.response#status"><a href="LuCI.response.html#status">status</a></li>
2567
2568 <li data-name="LuCI.response#statusText"><a href="LuCI.response.html#statusText">statusText</a></li>
2569
2570 <li data-name="LuCI.response#url"><a href="LuCI.response.html#url">url</a></li>
2571
2572 </ul>
2573 <ul class="typedefs itemMembers">
2574
2575 </ul>
2576 <ul class="typedefs itemMembers">
2577
2578 </ul>
2579 <ul class="methods itemMembers">
2580
2581 <span class="subtitle">Methods</span>
2582
2583 <li data-name="LuCI.response#blob"><a href="LuCI.response.html#blob">blob</a></li>
2584
2585 <li data-name="LuCI.response#clone"><a href="LuCI.response.html#clone">clone</a></li>
2586
2587 <li data-name="LuCI.response#json"><a href="LuCI.response.html#json">json</a></li>
2588
2589 <li data-name="LuCI.response#text"><a href="LuCI.response.html#text">text</a></li>
2590
2591 </ul>
2592 <ul class="events itemMembers">
2593
2594 </ul>
2595 </li>
2596
2597 <li class="item" data-name="LuCI.rpc">
2598 <span class="title">
2599 <a href="LuCI.rpc.html">LuCI.rpc</a>
2600
2601 </span>
2602 <ul class="members itemMembers">
2603
2604 </ul>
2605 <ul class="typedefs itemMembers">
2606
2607 <span class="subtitle">Typedefs</span>
2608
2609 <li data-name="LuCI.rpc.DeclareOptions"><a href="LuCI.rpc.html#.DeclareOptions">DeclareOptions</a></li>
2610
2611 <li data-name="LuCI.rpc~filterFn"><a href="LuCI.rpc.html#~filterFn">filterFn</a></li>
2612
2613 <li data-name="LuCI.rpc~interceptorFn"><a href="LuCI.rpc.html#~interceptorFn">interceptorFn</a></li>
2614
2615 <li data-name="LuCI.rpc~invokeFn"><a href="LuCI.rpc.html#~invokeFn">invokeFn</a></li>
2616
2617 </ul>
2618 <ul class="typedefs itemMembers">
2619
2620 </ul>
2621 <ul class="methods itemMembers">
2622
2623 <span class="subtitle">Methods</span>
2624
2625 <li data-name="LuCI.rpc#addInterceptor"><a href="LuCI.rpc.html#addInterceptor">addInterceptor</a></li>
2626
2627 <li data-name="LuCI.rpc#declare"><a href="LuCI.rpc.html#declare">declare</a></li>
2628
2629 <li data-name="LuCI.rpc#getBaseURL"><a href="LuCI.rpc.html#getBaseURL">getBaseURL</a></li>
2630
2631 <li data-name="LuCI.rpc#getSessionID"><a href="LuCI.rpc.html#getSessionID">getSessionID</a></li>
2632
2633 <li data-name="LuCI.rpc#getStatusText"><a href="LuCI.rpc.html#getStatusText">getStatusText</a></li>
2634
2635 <li data-name="LuCI.rpc#list"><a href="LuCI.rpc.html#list">list</a></li>
2636
2637 <li data-name="LuCI.rpc#removeInterceptor"><a href="LuCI.rpc.html#removeInterceptor">removeInterceptor</a></li>
2638
2639 <li data-name="LuCI.rpc#setBaseURL"><a href="LuCI.rpc.html#setBaseURL">setBaseURL</a></li>
2640
2641 <li data-name="LuCI.rpc#setSessionID"><a href="LuCI.rpc.html#setSessionID">setSessionID</a></li>
2642
2643 </ul>
2644 <ul class="events itemMembers">
2645
2646 </ul>
2647 </li>
2648
2649 <li class="item" data-name="LuCI.session">
2650 <span class="title">
2651 <a href="LuCI.session.html">LuCI.session</a>
2652
2653 </span>
2654 <ul class="members itemMembers">
2655
2656 </ul>
2657 <ul class="typedefs itemMembers">
2658
2659 </ul>
2660 <ul class="typedefs itemMembers">
2661
2662 </ul>
2663 <ul class="methods itemMembers">
2664
2665 <span class="subtitle">Methods</span>
2666
2667 <li data-name="LuCI.session#getID"><a href="LuCI.session.html#getID">getID</a></li>
2668
2669 <li data-name="LuCI.session#getLocalData"><a href="LuCI.session.html#getLocalData">getLocalData</a></li>
2670
2671 <li data-name="LuCI.session#getToken"><a href="LuCI.session.html#getToken">getToken</a></li>
2672
2673 <li data-name="LuCI.session#setLocalData"><a href="LuCI.session.html#setLocalData">setLocalData</a></li>
2674
2675 </ul>
2676 <ul class="events itemMembers">
2677
2678 </ul>
2679 </li>
2680
2681 <li class="item" data-name="LuCI.uci">
2682 <span class="title">
2683 <a href="LuCI.uci.html">LuCI.uci</a>
2684
2685 </span>
2686 <ul class="members itemMembers">
2687
2688 </ul>
2689 <ul class="typedefs itemMembers">
2690
2691 <span class="subtitle">Typedefs</span>
2692
2693 <li data-name="LuCI.uci.ChangeRecord"><a href="LuCI.uci.html#.ChangeRecord">ChangeRecord</a></li>
2694
2695 <li data-name="LuCI.uci.SectionObject"><a href="LuCI.uci.html#.SectionObject">SectionObject</a></li>
2696
2697 <li data-name="LuCI.uci~sectionsFn"><a href="LuCI.uci.html#~sectionsFn">sectionsFn</a></li>
2698
2699 </ul>
2700 <ul class="typedefs itemMembers">
2701
2702 </ul>
2703 <ul class="methods itemMembers">
2704
2705 <span class="subtitle">Methods</span>
2706
2707 <li data-name="LuCI.uci#add"><a href="LuCI.uci.html#add">add</a></li>
2708
2709 <li data-name="LuCI.uci#apply"><a href="LuCI.uci.html#apply">apply</a></li>
2710
2711 <li data-name="LuCI.uci#changes"><a href="LuCI.uci.html#changes">changes</a></li>
2712
2713 <li data-name="LuCI.uci#createSID"><a href="LuCI.uci.html#createSID">createSID</a></li>
2714
2715 <li data-name="LuCI.uci#get"><a href="LuCI.uci.html#get">get</a></li>
2716
2717 <li data-name="LuCI.uci#get_first"><a href="LuCI.uci.html#get_first">get_first</a></li>
2718
2719 <li data-name="LuCI.uci#load"><a href="LuCI.uci.html#load">load</a></li>
2720
2721 <li data-name="LuCI.uci#move"><a href="LuCI.uci.html#move">move</a></li>
2722
2723 <li data-name="LuCI.uci#remove"><a href="LuCI.uci.html#remove">remove</a></li>
2724
2725 <li data-name="LuCI.uci#resolveSID"><a href="LuCI.uci.html#resolveSID">resolveSID</a></li>
2726
2727 <li data-name="LuCI.uci#save"><a href="LuCI.uci.html#save">save</a></li>
2728
2729 <li data-name="LuCI.uci#sections"><a href="LuCI.uci.html#sections">sections</a></li>
2730
2731 <li data-name="LuCI.uci#set"><a href="LuCI.uci.html#set">set</a></li>
2732
2733 <li data-name="LuCI.uci#set_first"><a href="LuCI.uci.html#set_first">set_first</a></li>
2734
2735 <li data-name="LuCI.uci#unload"><a href="LuCI.uci.html#unload">unload</a></li>
2736
2737 <li data-name="LuCI.uci#unset"><a href="LuCI.uci.html#unset">unset</a></li>
2738
2739 <li data-name="LuCI.uci#unset_first"><a href="LuCI.uci.html#unset_first">unset_first</a></li>
2740
2741 </ul>
2742 <ul class="events itemMembers">
2743
2744 </ul>
2745 </li>
2746
2747 <li class="item" data-name="LuCI.ui">
2748 <span class="title">
2749 <a href="LuCI.ui.html">LuCI.ui</a>
2750
2751 </span>
2752 <ul class="members itemMembers">
2753
2754 </ul>
2755 <ul class="typedefs itemMembers">
2756
2757 <span class="subtitle">Typedefs</span>
2758
2759 <li data-name="LuCI.ui.FileUploadReply"><a href="LuCI.ui.html#.FileUploadReply">FileUploadReply</a></li>
2760
2761 </ul>
2762 <ul class="typedefs itemMembers">
2763
2764 </ul>
2765 <ul class="methods itemMembers">
2766
2767 <span class="subtitle">Methods</span>
2768
2769 <li data-name="LuCI.ui#addNotification"><a href="LuCI.ui.html#addNotification">addNotification</a></li>
2770
2771 <li data-name="LuCI.ui#addValidator"><a href="LuCI.ui.html#addValidator">addValidator</a></li>
2772
2773 <li data-name="LuCI.ui#awaitReconnect"><a href="LuCI.ui.html#awaitReconnect">awaitReconnect</a></li>
2774
2775 <li data-name="LuCI.ui#createHandlerFn"><a href="LuCI.ui.html#createHandlerFn">createHandlerFn</a></li>
2776
2777 <li data-name="LuCI.ui#hideIndicator"><a href="LuCI.ui.html#hideIndicator">hideIndicator</a></li>
2778
2779 <li data-name="LuCI.ui#hideModal"><a href="LuCI.ui.html#hideModal">hideModal</a></li>
2780
2781 <li data-name="LuCI.ui#instantiateView"><a href="LuCI.ui.html#instantiateView">instantiateView</a></li>
2782
2783 <li data-name="LuCI.ui#itemlist"><a href="LuCI.ui.html#itemlist">itemlist</a></li>
2784
2785 <li data-name="LuCI.ui#pingDevice"><a href="LuCI.ui.html#pingDevice">pingDevice</a></li>
2786
2787 <li data-name="LuCI.ui#showIndicator"><a href="LuCI.ui.html#showIndicator">showIndicator</a></li>
2788
2789 <li data-name="LuCI.ui#showModal"><a href="LuCI.ui.html#showModal">showModal</a></li>
2790
2791 <li data-name="LuCI.ui#uploadFile"><a href="LuCI.ui.html#uploadFile">uploadFile</a></li>
2792
2793 </ul>
2794 <ul class="events itemMembers">
2795
2796 </ul>
2797 </li>
2798
2799 <li class="item" data-name="LuCI.ui.AbstractElement">
2800 <span class="title">
2801 <a href="LuCI.ui.AbstractElement.html">LuCI.ui.AbstractElement</a>
2802
2803 </span>
2804 <ul class="members itemMembers">
2805
2806 </ul>
2807 <ul class="typedefs itemMembers">
2808
2809 <span class="subtitle">Typedefs</span>
2810
2811 <li data-name="LuCI.ui.AbstractElement.InitOptions"><a href="LuCI.ui.AbstractElement.html#.InitOptions">InitOptions</a></li>
2812
2813 </ul>
2814 <ul class="typedefs itemMembers">
2815
2816 </ul>
2817 <ul class="methods itemMembers">
2818
2819 <span class="subtitle">Methods</span>
2820
2821 <li data-name="LuCI.ui.AbstractElement#getValidationError"><a href="LuCI.ui.AbstractElement.html#getValidationError">getValidationError</a></li>
2822
2823 <li data-name="LuCI.ui.AbstractElement#getValue"><a href="LuCI.ui.AbstractElement.html#getValue">getValue</a></li>
2824
2825 <li data-name="LuCI.ui.AbstractElement#isChanged"><a href="LuCI.ui.AbstractElement.html#isChanged">isChanged</a></li>
2826
2827 <li data-name="LuCI.ui.AbstractElement#isValid"><a href="LuCI.ui.AbstractElement.html#isValid">isValid</a></li>
2828
2829 <li data-name="LuCI.ui.AbstractElement#registerEvents"><a href="LuCI.ui.AbstractElement.html#registerEvents">registerEvents</a></li>
2830
2831 <li data-name="LuCI.ui.AbstractElement#render"><a href="LuCI.ui.AbstractElement.html#render">render</a></li>
2832
2833 <li data-name="LuCI.ui.AbstractElement#setChangeEvents"><a href="LuCI.ui.AbstractElement.html#setChangeEvents">setChangeEvents</a></li>
2834
2835 <li data-name="LuCI.ui.AbstractElement#setPlaceholder"><a href="LuCI.ui.AbstractElement.html#setPlaceholder">setPlaceholder</a></li>
2836
2837 <li data-name="LuCI.ui.AbstractElement#setUpdateEvents"><a href="LuCI.ui.AbstractElement.html#setUpdateEvents">setUpdateEvents</a></li>
2838
2839 <li data-name="LuCI.ui.AbstractElement#setValue"><a href="LuCI.ui.AbstractElement.html#setValue">setValue</a></li>
2840
2841 <li data-name="LuCI.ui.AbstractElement#triggerValidation"><a href="LuCI.ui.AbstractElement.html#triggerValidation">triggerValidation</a></li>
2842
2843 </ul>
2844 <ul class="events itemMembers">
2845
2846 </ul>
2847 </li>
2848
2849 <li class="item" data-name="LuCI.ui.changes">
2850 <span class="title">
2851 <a href="LuCI.ui.changes.html">LuCI.ui.changes</a>
2852
2853 </span>
2854 <ul class="members itemMembers">
2855
2856 </ul>
2857 <ul class="typedefs itemMembers">
2858
2859 </ul>
2860 <ul class="typedefs itemMembers">
2861
2862 </ul>
2863 <ul class="methods itemMembers">
2864
2865 <span class="subtitle">Methods</span>
2866
2867 <li data-name="LuCI.ui.changes#apply"><a href="LuCI.ui.changes.html#apply">apply</a></li>
2868
2869 <li data-name="LuCI.ui.changes#displayChanges"><a href="LuCI.ui.changes.html#displayChanges">displayChanges</a></li>
2870
2871 <li data-name="LuCI.ui.changes#renderChangeIndicator"><a href="LuCI.ui.changes.html#renderChangeIndicator">renderChangeIndicator</a></li>
2872
2873 <li data-name="LuCI.ui.changes#revert"><a href="LuCI.ui.changes.html#revert">revert</a></li>
2874
2875 <li data-name="LuCI.ui.changes#setIndicator"><a href="LuCI.ui.changes.html#setIndicator">setIndicator</a></li>
2876
2877 </ul>
2878 <ul class="events itemMembers">
2879
2880 </ul>
2881 </li>
2882
2883 <li class="item" data-name="LuCI.ui.Checkbox">
2884 <span class="title">
2885 <a href="LuCI.ui.Checkbox.html">LuCI.ui.Checkbox</a>
2886
2887 </span>
2888 <ul class="members itemMembers">
2889
2890 </ul>
2891 <ul class="typedefs itemMembers">
2892
2893 <span class="subtitle">Typedefs</span>
2894
2895 <li data-name="LuCI.ui.Checkbox.InitOptions"><a href="LuCI.ui.Checkbox.html#.InitOptions">InitOptions</a></li>
2896
2897 </ul>
2898 <ul class="typedefs itemMembers">
2899
2900 </ul>
2901 <ul class="methods itemMembers">
2902
2903 <span class="subtitle">Methods</span>
2904
2905 <li data-name="LuCI.ui.Checkbox#getValidationError"><a href="LuCI.ui.Checkbox.html#getValidationError">getValidationError</a></li>
2906
2907 <li data-name="LuCI.ui.Checkbox#getValue"><a href="LuCI.ui.Checkbox.html#getValue">getValue</a></li>
2908
2909 <li data-name="LuCI.ui.Checkbox#isChanged"><a href="LuCI.ui.Checkbox.html#isChanged">isChanged</a></li>
2910
2911 <li data-name="LuCI.ui.Checkbox#isChecked"><a href="LuCI.ui.Checkbox.html#isChecked">isChecked</a></li>
2912
2913 <li data-name="LuCI.ui.Checkbox#isValid"><a href="LuCI.ui.Checkbox.html#isValid">isValid</a></li>
2914
2915 <li data-name="LuCI.ui.Checkbox#registerEvents"><a href="LuCI.ui.Checkbox.html#registerEvents">registerEvents</a></li>
2916
2917 <li data-name="LuCI.ui.Checkbox#render"><a href="LuCI.ui.Checkbox.html#render">render</a></li>
2918
2919 <li data-name="LuCI.ui.Checkbox#setChangeEvents"><a href="LuCI.ui.Checkbox.html#setChangeEvents">setChangeEvents</a></li>
2920
2921 <li data-name="LuCI.ui.Checkbox#setPlaceholder"><a href="LuCI.ui.Checkbox.html#setPlaceholder">setPlaceholder</a></li>
2922
2923 <li data-name="LuCI.ui.Checkbox#setUpdateEvents"><a href="LuCI.ui.Checkbox.html#setUpdateEvents">setUpdateEvents</a></li>
2924
2925 <li data-name="LuCI.ui.Checkbox#setValue"><a href="LuCI.ui.Checkbox.html#setValue">setValue</a></li>
2926
2927 <li data-name="LuCI.ui.Checkbox#triggerValidation"><a href="LuCI.ui.Checkbox.html#triggerValidation">triggerValidation</a></li>
2928
2929 </ul>
2930 <ul class="events itemMembers">
2931
2932 </ul>
2933 </li>
2934
2935 <li class="item" data-name="LuCI.ui.Combobox">
2936 <span class="title">
2937 <a href="LuCI.ui.Combobox.html">LuCI.ui.Combobox</a>
2938
2939 </span>
2940 <ul class="members itemMembers">
2941
2942 </ul>
2943 <ul class="typedefs itemMembers">
2944
2945 <span class="subtitle">Typedefs</span>
2946
2947 <li data-name="LuCI.ui.Combobox.InitOptions"><a href="LuCI.ui.Combobox.html#.InitOptions">InitOptions</a></li>
2948
2949 </ul>
2950 <ul class="typedefs itemMembers">
2951
2952 </ul>
2953 <ul class="methods itemMembers">
2954
2955 <span class="subtitle">Methods</span>
2956
2957 <li data-name="LuCI.ui.Combobox#addChoices"><a href="LuCI.ui.Combobox.html#addChoices">addChoices</a></li>
2958
2959 <li data-name="LuCI.ui.Combobox#clearChoices"><a href="LuCI.ui.Combobox.html#clearChoices">clearChoices</a></li>
2960
2961 <li data-name="LuCI.ui.Combobox#closeAllDropdowns"><a href="LuCI.ui.Combobox.html#closeAllDropdowns">closeAllDropdowns</a></li>
2962
2963 <li data-name="LuCI.ui.Combobox#getValidationError"><a href="LuCI.ui.Combobox.html#getValidationError">getValidationError</a></li>
2964
2965 <li data-name="LuCI.ui.Combobox#isChanged"><a href="LuCI.ui.Combobox.html#isChanged">isChanged</a></li>
2966
2967 <li data-name="LuCI.ui.Combobox#isValid"><a href="LuCI.ui.Combobox.html#isValid">isValid</a></li>
2968
2969 <li data-name="LuCI.ui.Combobox#registerEvents"><a href="LuCI.ui.Combobox.html#registerEvents">registerEvents</a></li>
2970
2971 <li data-name="LuCI.ui.Combobox#setChangeEvents"><a href="LuCI.ui.Combobox.html#setChangeEvents">setChangeEvents</a></li>
2972
2973 <li data-name="LuCI.ui.Combobox#setPlaceholder"><a href="LuCI.ui.Combobox.html#setPlaceholder">setPlaceholder</a></li>
2974
2975 <li data-name="LuCI.ui.Combobox#setUpdateEvents"><a href="LuCI.ui.Combobox.html#setUpdateEvents">setUpdateEvents</a></li>
2976
2977 <li data-name="LuCI.ui.Combobox#triggerValidation"><a href="LuCI.ui.Combobox.html#triggerValidation">triggerValidation</a></li>
2978
2979 </ul>
2980 <ul class="events itemMembers">
2981
2982 </ul>
2983 </li>
2984
2985 <li class="item" data-name="LuCI.ui.ComboButton">
2986 <span class="title">
2987 <a href="LuCI.ui.ComboButton.html">LuCI.ui.ComboButton</a>
2988
2989 </span>
2990 <ul class="members itemMembers">
2991
2992 </ul>
2993 <ul class="typedefs itemMembers">
2994
2995 <span class="subtitle">Typedefs</span>
2996
2997 <li data-name="LuCI.ui.ComboButton.InitOptions"><a href="LuCI.ui.ComboButton.html#.InitOptions">InitOptions</a></li>
2998
2999 </ul>
3000 <ul class="typedefs itemMembers">
3001
3002 </ul>
3003 <ul class="methods itemMembers">
3004
3005 <span class="subtitle">Methods</span>
3006
3007 <li data-name="LuCI.ui.ComboButton#addChoices"><a href="LuCI.ui.ComboButton.html#addChoices">addChoices</a></li>
3008
3009 <li data-name="LuCI.ui.ComboButton#clearChoices"><a href="LuCI.ui.ComboButton.html#clearChoices">clearChoices</a></li>
3010
3011 <li data-name="LuCI.ui.ComboButton#closeAllDropdowns"><a href="LuCI.ui.ComboButton.html#closeAllDropdowns">closeAllDropdowns</a></li>
3012
3013 <li data-name="LuCI.ui.ComboButton#getValidationError"><a href="LuCI.ui.ComboButton.html#getValidationError">getValidationError</a></li>
3014
3015 <li data-name="LuCI.ui.ComboButton#isChanged"><a href="LuCI.ui.ComboButton.html#isChanged">isChanged</a></li>
3016
3017 <li data-name="LuCI.ui.ComboButton#isValid"><a href="LuCI.ui.ComboButton.html#isValid">isValid</a></li>
3018
3019 <li data-name="LuCI.ui.ComboButton#registerEvents"><a href="LuCI.ui.ComboButton.html#registerEvents">registerEvents</a></li>
3020
3021 <li data-name="LuCI.ui.ComboButton#setChangeEvents"><a href="LuCI.ui.ComboButton.html#setChangeEvents">setChangeEvents</a></li>
3022
3023 <li data-name="LuCI.ui.ComboButton#setPlaceholder"><a href="LuCI.ui.ComboButton.html#setPlaceholder">setPlaceholder</a></li>
3024
3025 <li data-name="LuCI.ui.ComboButton#setUpdateEvents"><a href="LuCI.ui.ComboButton.html#setUpdateEvents">setUpdateEvents</a></li>
3026
3027 <li data-name="LuCI.ui.ComboButton#triggerValidation"><a href="LuCI.ui.ComboButton.html#triggerValidation">triggerValidation</a></li>
3028
3029 </ul>
3030 <ul class="events itemMembers">
3031
3032 </ul>
3033 </li>
3034
3035 <li class="item" data-name="LuCI.ui.Dropdown">
3036 <span class="title">
3037 <a href="LuCI.ui.Dropdown.html">LuCI.ui.Dropdown</a>
3038
3039 </span>
3040 <ul class="members itemMembers">
3041
3042 </ul>
3043 <ul class="typedefs itemMembers">
3044
3045 <span class="subtitle">Typedefs</span>
3046
3047 <li data-name="LuCI.ui.Dropdown.InitOptions"><a href="LuCI.ui.Dropdown.html#.InitOptions">InitOptions</a></li>
3048
3049 </ul>
3050 <ul class="typedefs itemMembers">
3051
3052 </ul>
3053 <ul class="methods itemMembers">
3054
3055 <span class="subtitle">Methods</span>
3056
3057 <li data-name="LuCI.ui.Dropdown#addChoices"><a href="LuCI.ui.Dropdown.html#addChoices">addChoices</a></li>
3058
3059 <li data-name="LuCI.ui.Dropdown#clearChoices"><a href="LuCI.ui.Dropdown.html#clearChoices">clearChoices</a></li>
3060
3061 <li data-name="LuCI.ui.Dropdown#closeAllDropdowns"><a href="LuCI.ui.Dropdown.html#closeAllDropdowns">closeAllDropdowns</a></li>
3062
3063 <li data-name="LuCI.ui.Dropdown#getValidationError"><a href="LuCI.ui.Dropdown.html#getValidationError">getValidationError</a></li>
3064
3065 <li data-name="LuCI.ui.Dropdown#getValue"><a href="LuCI.ui.Dropdown.html#getValue">getValue</a></li>
3066
3067 <li data-name="LuCI.ui.Dropdown#isChanged"><a href="LuCI.ui.Dropdown.html#isChanged">isChanged</a></li>
3068
3069 <li data-name="LuCI.ui.Dropdown#isValid"><a href="LuCI.ui.Dropdown.html#isValid">isValid</a></li>
3070
3071 <li data-name="LuCI.ui.Dropdown#registerEvents"><a href="LuCI.ui.Dropdown.html#registerEvents">registerEvents</a></li>
3072
3073 <li data-name="LuCI.ui.Dropdown#render"><a href="LuCI.ui.Dropdown.html#render">render</a></li>
3074
3075 <li data-name="LuCI.ui.Dropdown#setChangeEvents"><a href="LuCI.ui.Dropdown.html#setChangeEvents">setChangeEvents</a></li>
3076
3077 <li data-name="LuCI.ui.Dropdown#setPlaceholder"><a href="LuCI.ui.Dropdown.html#setPlaceholder">setPlaceholder</a></li>
3078
3079 <li data-name="LuCI.ui.Dropdown#setUpdateEvents"><a href="LuCI.ui.Dropdown.html#setUpdateEvents">setUpdateEvents</a></li>
3080
3081 <li data-name="LuCI.ui.Dropdown#setValue"><a href="LuCI.ui.Dropdown.html#setValue">setValue</a></li>
3082
3083 <li data-name="LuCI.ui.Dropdown#triggerValidation"><a href="LuCI.ui.Dropdown.html#triggerValidation">triggerValidation</a></li>
3084
3085 </ul>
3086 <ul class="events itemMembers">
3087
3088 </ul>
3089 </li>
3090
3091 <li class="item" data-name="LuCI.ui.DynamicList">
3092 <span class="title">
3093 <a href="LuCI.ui.DynamicList.html">LuCI.ui.DynamicList</a>
3094
3095 </span>
3096 <ul class="members itemMembers">
3097
3098 </ul>
3099 <ul class="typedefs itemMembers">
3100
3101 <span class="subtitle">Typedefs</span>
3102
3103 <li data-name="LuCI.ui.DynamicList.InitOptions"><a href="LuCI.ui.DynamicList.html#.InitOptions">InitOptions</a></li>
3104
3105 </ul>
3106 <ul class="typedefs itemMembers">
3107
3108 </ul>
3109 <ul class="methods itemMembers">
3110
3111 <span class="subtitle">Methods</span>
3112
3113 <li data-name="LuCI.ui.DynamicList#addChoices"><a href="LuCI.ui.DynamicList.html#addChoices">addChoices</a></li>
3114
3115 <li data-name="LuCI.ui.DynamicList#clearChoices"><a href="LuCI.ui.DynamicList.html#clearChoices">clearChoices</a></li>
3116
3117 <li data-name="LuCI.ui.DynamicList#getValidationError"><a href="LuCI.ui.DynamicList.html#getValidationError">getValidationError</a></li>
3118
3119 <li data-name="LuCI.ui.DynamicList#getValue"><a href="LuCI.ui.DynamicList.html#getValue">getValue</a></li>
3120
3121 <li data-name="LuCI.ui.DynamicList#isChanged"><a href="LuCI.ui.DynamicList.html#isChanged">isChanged</a></li>
3122
3123 <li data-name="LuCI.ui.DynamicList#isValid"><a href="LuCI.ui.DynamicList.html#isValid">isValid</a></li>
3124
3125 <li data-name="LuCI.ui.DynamicList#registerEvents"><a href="LuCI.ui.DynamicList.html#registerEvents">registerEvents</a></li>
3126
3127 <li data-name="LuCI.ui.DynamicList#render"><a href="LuCI.ui.DynamicList.html#render">render</a></li>
3128
3129 <li data-name="LuCI.ui.DynamicList#setChangeEvents"><a href="LuCI.ui.DynamicList.html#setChangeEvents">setChangeEvents</a></li>
3130
3131 <li data-name="LuCI.ui.DynamicList#setPlaceholder"><a href="LuCI.ui.DynamicList.html#setPlaceholder">setPlaceholder</a></li>
3132
3133 <li data-name="LuCI.ui.DynamicList#setUpdateEvents"><a href="LuCI.ui.DynamicList.html#setUpdateEvents">setUpdateEvents</a></li>
3134
3135 <li data-name="LuCI.ui.DynamicList#setValue"><a href="LuCI.ui.DynamicList.html#setValue">setValue</a></li>
3136
3137 <li data-name="LuCI.ui.DynamicList#triggerValidation"><a href="LuCI.ui.DynamicList.html#triggerValidation">triggerValidation</a></li>
3138
3139 </ul>
3140 <ul class="events itemMembers">
3141
3142 </ul>
3143 </li>
3144
3145 <li class="item" data-name="LuCI.ui.FileUpload">
3146 <span class="title">
3147 <a href="LuCI.ui.FileUpload.html">LuCI.ui.FileUpload</a>
3148
3149 </span>
3150 <ul class="members itemMembers">
3151
3152 </ul>
3153 <ul class="typedefs itemMembers">
3154
3155 <span class="subtitle">Typedefs</span>
3156
3157 <li data-name="LuCI.ui.FileUpload.InitOptions"><a href="LuCI.ui.FileUpload.html#.InitOptions">InitOptions</a></li>
3158
3159 </ul>
3160 <ul class="typedefs itemMembers">
3161
3162 </ul>
3163 <ul class="methods itemMembers">
3164
3165 <span class="subtitle">Methods</span>
3166
3167 <li data-name="LuCI.ui.FileUpload#getValidationError"><a href="LuCI.ui.FileUpload.html#getValidationError">getValidationError</a></li>
3168
3169 <li data-name="LuCI.ui.FileUpload#getValue"><a href="LuCI.ui.FileUpload.html#getValue">getValue</a></li>
3170
3171 <li data-name="LuCI.ui.FileUpload#isChanged"><a href="LuCI.ui.FileUpload.html#isChanged">isChanged</a></li>
3172
3173 <li data-name="LuCI.ui.FileUpload#isValid"><a href="LuCI.ui.FileUpload.html#isValid">isValid</a></li>
3174
3175 <li data-name="LuCI.ui.FileUpload#registerEvents"><a href="LuCI.ui.FileUpload.html#registerEvents">registerEvents</a></li>
3176
3177 <li data-name="LuCI.ui.FileUpload#render"><a href="LuCI.ui.FileUpload.html#render">render</a></li>
3178
3179 <li data-name="LuCI.ui.FileUpload#setChangeEvents"><a href="LuCI.ui.FileUpload.html#setChangeEvents">setChangeEvents</a></li>
3180
3181 <li data-name="LuCI.ui.FileUpload#setPlaceholder"><a href="LuCI.ui.FileUpload.html#setPlaceholder">setPlaceholder</a></li>
3182
3183 <li data-name="LuCI.ui.FileUpload#setUpdateEvents"><a href="LuCI.ui.FileUpload.html#setUpdateEvents">setUpdateEvents</a></li>
3184
3185 <li data-name="LuCI.ui.FileUpload#setValue"><a href="LuCI.ui.FileUpload.html#setValue">setValue</a></li>
3186
3187 <li data-name="LuCI.ui.FileUpload#triggerValidation"><a href="LuCI.ui.FileUpload.html#triggerValidation">triggerValidation</a></li>
3188
3189 </ul>
3190 <ul class="events itemMembers">
3191
3192 </ul>
3193 </li>
3194
3195 <li class="item" data-name="LuCI.ui.Hiddenfield">
3196 <span class="title">
3197 <a href="LuCI.ui.Hiddenfield.html">LuCI.ui.Hiddenfield</a>
3198
3199 </span>
3200 <ul class="members itemMembers">
3201
3202 </ul>
3203 <ul class="typedefs itemMembers">
3204
3205 </ul>
3206 <ul class="typedefs itemMembers">
3207
3208 </ul>
3209 <ul class="methods itemMembers">
3210
3211 <span class="subtitle">Methods</span>
3212
3213 <li data-name="LuCI.ui.Hiddenfield#getValidationError"><a href="LuCI.ui.Hiddenfield.html#getValidationError">getValidationError</a></li>
3214
3215 <li data-name="LuCI.ui.Hiddenfield#getValue"><a href="LuCI.ui.Hiddenfield.html#getValue">getValue</a></li>
3216
3217 <li data-name="LuCI.ui.Hiddenfield#isChanged"><a href="LuCI.ui.Hiddenfield.html#isChanged">isChanged</a></li>
3218
3219 <li data-name="LuCI.ui.Hiddenfield#isValid"><a href="LuCI.ui.Hiddenfield.html#isValid">isValid</a></li>
3220
3221 <li data-name="LuCI.ui.Hiddenfield#registerEvents"><a href="LuCI.ui.Hiddenfield.html#registerEvents">registerEvents</a></li>
3222
3223 <li data-name="LuCI.ui.Hiddenfield#render"><a href="LuCI.ui.Hiddenfield.html#render">render</a></li>
3224
3225 <li data-name="LuCI.ui.Hiddenfield#setChangeEvents"><a href="LuCI.ui.Hiddenfield.html#setChangeEvents">setChangeEvents</a></li>
3226
3227 <li data-name="LuCI.ui.Hiddenfield#setPlaceholder"><a href="LuCI.ui.Hiddenfield.html#setPlaceholder">setPlaceholder</a></li>
3228
3229 <li data-name="LuCI.ui.Hiddenfield#setUpdateEvents"><a href="LuCI.ui.Hiddenfield.html#setUpdateEvents">setUpdateEvents</a></li>
3230
3231 <li data-name="LuCI.ui.Hiddenfield#setValue"><a href="LuCI.ui.Hiddenfield.html#setValue">setValue</a></li>
3232
3233 <li data-name="LuCI.ui.Hiddenfield#triggerValidation"><a href="LuCI.ui.Hiddenfield.html#triggerValidation">triggerValidation</a></li>
3234
3235 </ul>
3236 <ul class="events itemMembers">
3237
3238 </ul>
3239 </li>
3240
3241 <li class="item" data-name="LuCI.ui.menu">
3242 <span class="title">
3243 <a href="LuCI.ui.menu.html">LuCI.ui.menu</a>
3244
3245 </span>
3246 <ul class="members itemMembers">
3247
3248 </ul>
3249 <ul class="typedefs itemMembers">
3250
3251 <span class="subtitle">Typedefs</span>
3252
3253 <li data-name="LuCI.ui.menu.MenuNode"><a href="LuCI.ui.menu.html#.MenuNode">MenuNode</a></li>
3254
3255 </ul>
3256 <ul class="typedefs itemMembers">
3257
3258 </ul>
3259 <ul class="methods itemMembers">
3260
3261 <span class="subtitle">Methods</span>
3262
3263 <li data-name="LuCI.ui.menu#flushCache"><a href="LuCI.ui.menu.html#flushCache">flushCache</a></li>
3264
3265 <li data-name="LuCI.ui.menu#getChildren"><a href="LuCI.ui.menu.html#getChildren">getChildren</a></li>
3266
3267 <li data-name="LuCI.ui.menu#load"><a href="LuCI.ui.menu.html#load">load</a></li>
3268
3269 </ul>
3270 <ul class="events itemMembers">
3271
3272 </ul>
3273 </li>
3274
3275 <li class="item" data-name="LuCI.ui.Select">
3276 <span class="title">
3277 <a href="LuCI.ui.Select.html">LuCI.ui.Select</a>
3278
3279 </span>
3280 <ul class="members itemMembers">
3281
3282 </ul>
3283 <ul class="typedefs itemMembers">
3284
3285 <span class="subtitle">Typedefs</span>
3286
3287 <li data-name="LuCI.ui.Select.InitOptions"><a href="LuCI.ui.Select.html#.InitOptions">InitOptions</a></li>
3288
3289 </ul>
3290 <ul class="typedefs itemMembers">
3291
3292 </ul>
3293 <ul class="methods itemMembers">
3294
3295 <span class="subtitle">Methods</span>
3296
3297 <li data-name="LuCI.ui.Select#getValidationError"><a href="LuCI.ui.Select.html#getValidationError">getValidationError</a></li>
3298
3299 <li data-name="LuCI.ui.Select#getValue"><a href="LuCI.ui.Select.html#getValue">getValue</a></li>
3300
3301 <li data-name="LuCI.ui.Select#isChanged"><a href="LuCI.ui.Select.html#isChanged">isChanged</a></li>
3302
3303 <li data-name="LuCI.ui.Select#isValid"><a href="LuCI.ui.Select.html#isValid">isValid</a></li>
3304
3305 <li data-name="LuCI.ui.Select#registerEvents"><a href="LuCI.ui.Select.html#registerEvents">registerEvents</a></li>
3306
3307 <li data-name="LuCI.ui.Select#render"><a href="LuCI.ui.Select.html#render">render</a></li>
3308
3309 <li data-name="LuCI.ui.Select#setChangeEvents"><a href="LuCI.ui.Select.html#setChangeEvents">setChangeEvents</a></li>
3310
3311 <li data-name="LuCI.ui.Select#setPlaceholder"><a href="LuCI.ui.Select.html#setPlaceholder">setPlaceholder</a></li>
3312
3313 <li data-name="LuCI.ui.Select#setUpdateEvents"><a href="LuCI.ui.Select.html#setUpdateEvents">setUpdateEvents</a></li>
3314
3315 <li data-name="LuCI.ui.Select#setValue"><a href="LuCI.ui.Select.html#setValue">setValue</a></li>
3316
3317 <li data-name="LuCI.ui.Select#triggerValidation"><a href="LuCI.ui.Select.html#triggerValidation">triggerValidation</a></li>
3318
3319 </ul>
3320 <ul class="events itemMembers">
3321
3322 </ul>
3323 </li>
3324
3325 <li class="item" data-name="LuCI.ui.tabs">
3326 <span class="title">
3327 <a href="LuCI.ui.tabs.html">LuCI.ui.tabs</a>
3328
3329 </span>
3330 <ul class="members itemMembers">
3331
3332 </ul>
3333 <ul class="typedefs itemMembers">
3334
3335 </ul>
3336 <ul class="typedefs itemMembers">
3337
3338 </ul>
3339 <ul class="methods itemMembers">
3340
3341 <span class="subtitle">Methods</span>
3342
3343 <li data-name="LuCI.ui.tabs#initTabGroup"><a href="LuCI.ui.tabs.html#initTabGroup">initTabGroup</a></li>
3344
3345 <li data-name="LuCI.ui.tabs#isEmptyPane"><a href="LuCI.ui.tabs.html#isEmptyPane">isEmptyPane</a></li>
3346
3347 </ul>
3348 <ul class="events itemMembers">
3349
3350 </ul>
3351 </li>
3352
3353 <li class="item" data-name="LuCI.ui.Textarea">
3354 <span class="title">
3355 <a href="LuCI.ui.Textarea.html">LuCI.ui.Textarea</a>
3356
3357 </span>
3358 <ul class="members itemMembers">
3359
3360 </ul>
3361 <ul class="typedefs itemMembers">
3362
3363 <span class="subtitle">Typedefs</span>
3364
3365 <li data-name="LuCI.ui.Textarea.InitOptions"><a href="LuCI.ui.Textarea.html#.InitOptions">InitOptions</a></li>
3366
3367 </ul>
3368 <ul class="typedefs itemMembers">
3369
3370 </ul>
3371 <ul class="methods itemMembers">
3372
3373 <span class="subtitle">Methods</span>
3374
3375 <li data-name="LuCI.ui.Textarea#getValidationError"><a href="LuCI.ui.Textarea.html#getValidationError">getValidationError</a></li>
3376
3377 <li data-name="LuCI.ui.Textarea#getValue"><a href="LuCI.ui.Textarea.html#getValue">getValue</a></li>
3378
3379 <li data-name="LuCI.ui.Textarea#isChanged"><a href="LuCI.ui.Textarea.html#isChanged">isChanged</a></li>
3380
3381 <li data-name="LuCI.ui.Textarea#isValid"><a href="LuCI.ui.Textarea.html#isValid">isValid</a></li>
3382
3383 <li data-name="LuCI.ui.Textarea#registerEvents"><a href="LuCI.ui.Textarea.html#registerEvents">registerEvents</a></li>
3384
3385 <li data-name="LuCI.ui.Textarea#render"><a href="LuCI.ui.Textarea.html#render">render</a></li>
3386
3387 <li data-name="LuCI.ui.Textarea#setChangeEvents"><a href="LuCI.ui.Textarea.html#setChangeEvents">setChangeEvents</a></li>
3388
3389 <li data-name="LuCI.ui.Textarea#setPlaceholder"><a href="LuCI.ui.Textarea.html#setPlaceholder">setPlaceholder</a></li>
3390
3391 <li data-name="LuCI.ui.Textarea#setUpdateEvents"><a href="LuCI.ui.Textarea.html#setUpdateEvents">setUpdateEvents</a></li>
3392
3393 <li data-name="LuCI.ui.Textarea#setValue"><a href="LuCI.ui.Textarea.html#setValue">setValue</a></li>
3394
3395 <li data-name="LuCI.ui.Textarea#triggerValidation"><a href="LuCI.ui.Textarea.html#triggerValidation">triggerValidation</a></li>
3396
3397 </ul>
3398 <ul class="events itemMembers">
3399
3400 </ul>
3401 </li>
3402
3403 <li class="item" data-name="LuCI.ui.Textfield">
3404 <span class="title">
3405 <a href="LuCI.ui.Textfield.html">LuCI.ui.Textfield</a>
3406
3407 </span>
3408 <ul class="members itemMembers">
3409
3410 </ul>
3411 <ul class="typedefs itemMembers">
3412
3413 <span class="subtitle">Typedefs</span>
3414
3415 <li data-name="LuCI.ui.Textfield.InitOptions"><a href="LuCI.ui.Textfield.html#.InitOptions">InitOptions</a></li>
3416
3417 </ul>
3418 <ul class="typedefs itemMembers">
3419
3420 </ul>
3421 <ul class="methods itemMembers">
3422
3423 <span class="subtitle">Methods</span>
3424
3425 <li data-name="LuCI.ui.Textfield#getValidationError"><a href="LuCI.ui.Textfield.html#getValidationError">getValidationError</a></li>
3426
3427 <li data-name="LuCI.ui.Textfield#getValue"><a href="LuCI.ui.Textfield.html#getValue">getValue</a></li>
3428
3429 <li data-name="LuCI.ui.Textfield#isChanged"><a href="LuCI.ui.Textfield.html#isChanged">isChanged</a></li>
3430
3431 <li data-name="LuCI.ui.Textfield#isValid"><a href="LuCI.ui.Textfield.html#isValid">isValid</a></li>
3432
3433 <li data-name="LuCI.ui.Textfield#registerEvents"><a href="LuCI.ui.Textfield.html#registerEvents">registerEvents</a></li>
3434
3435 <li data-name="LuCI.ui.Textfield#render"><a href="LuCI.ui.Textfield.html#render">render</a></li>
3436
3437 <li data-name="LuCI.ui.Textfield#setChangeEvents"><a href="LuCI.ui.Textfield.html#setChangeEvents">setChangeEvents</a></li>
3438
3439 <li data-name="LuCI.ui.Textfield#setPlaceholder"><a href="LuCI.ui.Textfield.html#setPlaceholder">setPlaceholder</a></li>
3440
3441 <li data-name="LuCI.ui.Textfield#setUpdateEvents"><a href="LuCI.ui.Textfield.html#setUpdateEvents">setUpdateEvents</a></li>
3442
3443 <li data-name="LuCI.ui.Textfield#setValue"><a href="LuCI.ui.Textfield.html#setValue">setValue</a></li>
3444
3445 <li data-name="LuCI.ui.Textfield#triggerValidation"><a href="LuCI.ui.Textfield.html#triggerValidation">triggerValidation</a></li>
3446
3447 </ul>
3448 <ul class="events itemMembers">
3449
3450 </ul>
3451 </li>
3452
3453 <li class="item" data-name="LuCI.view">
3454 <span class="title">
3455 <a href="LuCI.view.html">LuCI.view</a>
3456
3457 </span>
3458 <ul class="members itemMembers">
3459
3460 </ul>
3461 <ul class="typedefs itemMembers">
3462
3463 </ul>
3464 <ul class="typedefs itemMembers">
3465
3466 </ul>
3467 <ul class="methods itemMembers">
3468
3469 <span class="subtitle">Methods</span>
3470
3471 <li data-name="LuCI.view#addFooter"><a href="LuCI.view.html#addFooter">addFooter</a></li>
3472
3473 <li data-name="LuCI.view#handleReset"><a href="LuCI.view.html#handleReset">handleReset</a></li>
3474
3475 <li data-name="LuCI.view#handleSave"><a href="LuCI.view.html#handleSave">handleSave</a></li>
3476
3477 <li data-name="LuCI.view#handleSaveApply"><a href="LuCI.view.html#handleSaveApply">handleSaveApply</a></li>
3478
3479 <li data-name="LuCI.view#load"><a href="LuCI.view.html#load">load</a></li>
3480
3481 <li data-name="LuCI.view#render"><a href="LuCI.view.html#render">render</a></li>
3482
3483 </ul>
3484 <ul class="events itemMembers">
3485
3486 </ul>
3487 </li>
3488
3489 <li class="item" data-name="LuCI.xhr">
3490 <span class="title">
3491 <a href="LuCI.xhr.html">LuCI.xhr</a>
3492
3493 </span>
3494 <ul class="members itemMembers">
3495
3496 </ul>
3497 <ul class="typedefs itemMembers">
3498
3499 </ul>
3500 <ul class="typedefs itemMembers">
3501
3502 </ul>
3503 <ul class="methods itemMembers">
3504
3505 <span class="subtitle">Methods</span>
3506
3507 <li data-name="LuCI.xhr#abort"><a href="LuCI.xhr.html#abort">abort</a></li>
3508
3509 <li data-name="LuCI.xhr#busy"><a href="LuCI.xhr.html#busy">busy</a></li>
3510
3511 <li data-name="LuCI.xhr#cancel"><a href="LuCI.xhr.html#cancel">cancel</a></li>
3512
3513 <li data-name="LuCI.xhr#get"><a href="LuCI.xhr.html#get">get</a></li>
3514
3515 <li data-name="LuCI.xhr#post"><a href="LuCI.xhr.html#post">post</a></li>
3516
3517 <li data-name="LuCI.xhr#send_form"><a href="LuCI.xhr.html#send_form">send_form</a></li>
3518
3519 </ul>
3520 <ul class="events itemMembers">
3521
3522 </ul>
3523 </li>
3524
3525 </ul>
3526 </div>
3527 <div class="main">
3528 <h1 class="page-title" data-filename="network.js.html">Source: network.js</h1>
3529
3530
3531
3532
3533 <section>
3534 <article>
3535 <pre id="source-code" class="prettyprint source "><code>'use strict';
3536 'require uci';
3537 'require rpc';
3538 'require validation';
3539 'require baseclass';
3540 'require firewall';
3541
3542 var proto_errors = {
3543 CONNECT_FAILED: _('Connection attempt failed'),
3544 INVALID_ADDRESS: _('IP address is invalid'),
3545 INVALID_GATEWAY: _('Gateway address is invalid'),
3546 INVALID_LOCAL_ADDRESS: _('Local IP address is invalid'),
3547 MISSING_ADDRESS: _('IP address is missing'),
3548 MISSING_PEER_ADDRESS: _('Peer address is missing'),
3549 NO_DEVICE: _('Network device is not present'),
3550 NO_IFACE: _('Unable to determine device name'),
3551 NO_IFNAME: _('Unable to determine device name'),
3552 NO_WAN_ADDRESS: _('Unable to determine external IP address'),
3553 NO_WAN_LINK: _('Unable to determine upstream interface'),
3554 PEER_RESOLVE_FAIL: _('Unable to resolve peer host name'),
3555 PIN_FAILED: _('PIN code rejected')
3556 };
3557
3558 var iface_patterns_ignore = [
3559 /^wmaster\d+/,
3560 /^wifi\d+/,
3561 /^hwsim\d+/,
3562 /^imq\d+/,
3563 /^ifb\d+/,
3564 /^mon\.wlan\d+/,
3565 /^sit\d+/,
3566 /^gre\d+/,
3567 /^gretap\d+/,
3568 /^ip6gre\d+/,
3569 /^ip6tnl\d+/,
3570 /^tunl\d+/,
3571 /^lo$/
3572 ];
3573
3574 var iface_patterns_wireless = [
3575 /^wlan\d+/,
3576 /^wl\d+/,
3577 /^ath\d+/,
3578 /^\w+\.network\d+/
3579 ];
3580
3581 var iface_patterns_virtual = [ ];
3582
3583 var callLuciNetworkDevices = rpc.declare({
3584 object: 'luci-rpc',
3585 method: 'getNetworkDevices',
3586 expect: { '': {} }
3587 });
3588
3589 var callLuciWirelessDevices = rpc.declare({
3590 object: 'luci-rpc',
3591 method: 'getWirelessDevices',
3592 expect: { '': {} }
3593 });
3594
3595 var callLuciBoardJSON = rpc.declare({
3596 object: 'luci-rpc',
3597 method: 'getBoardJSON'
3598 });
3599
3600 var callLuciHostHints = rpc.declare({
3601 object: 'luci-rpc',
3602 method: 'getHostHints',
3603 expect: { '': {} }
3604 });
3605
3606 var callIwinfoAssoclist = rpc.declare({
3607 object: 'iwinfo',
3608 method: 'assoclist',
3609 params: [ 'device', 'mac' ],
3610 expect: { results: [] }
3611 });
3612
3613 var callIwinfoScan = rpc.declare({
3614 object: 'iwinfo',
3615 method: 'scan',
3616 params: [ 'device' ],
3617 nobatch: true,
3618 expect: { results: [] }
3619 });
3620
3621 var callNetworkInterfaceDump = rpc.declare({
3622 object: 'network.interface',
3623 method: 'dump',
3624 expect: { 'interface': [] }
3625 });
3626
3627 var callNetworkProtoHandlers = rpc.declare({
3628 object: 'network',
3629 method: 'get_proto_handlers',
3630 expect: { '': {} }
3631 });
3632
3633 var _init = null,
3634 _state = null,
3635 _protocols = {},
3636 _protospecs = {};
3637
3638 function getProtocolHandlers(cache) {
3639 return callNetworkProtoHandlers().then(function(protos) {
3640 /* Register "none" protocol */
3641 if (!protos.hasOwnProperty('none'))
3642 Object.assign(protos, { none: { no_device: false } });
3643
3644 /* Hack: emulate relayd protocol */
3645 if (!protos.hasOwnProperty('relay') &amp;&amp; L.hasSystemFeature('relayd'))
3646 Object.assign(protos, { relay: { no_device: true } });
3647
3648 Object.assign(_protospecs, protos);
3649
3650 return Promise.all(Object.keys(protos).map(function(p) {
3651 return Promise.resolve(L.require('protocol.%s'.format(p))).catch(function(err) {
3652 if (L.isObject(err) &amp;&amp; err.name != 'NetworkError')
3653 L.error(err);
3654 });
3655 })).then(function() {
3656 return protos;
3657 });
3658 }).catch(function() {
3659 return {};
3660 });
3661 }
3662
3663 function getWifiStateBySid(sid) {
3664 var s = uci.get('wireless', sid);
3665
3666 if (s != null &amp;&amp; s['.type'] == 'wifi-iface') {
3667 for (var radioname in _state.radios) {
3668 for (var i = 0; i &lt; _state.radios[radioname].interfaces.length; i++) {
3669 var netstate = _state.radios[radioname].interfaces[i];
3670
3671 if (typeof(netstate.section) != 'string')
3672 continue;
3673
3674 var s2 = uci.get('wireless', netstate.section);
3675
3676 if (s2 != null &amp;&amp; s['.type'] == s2['.type'] &amp;&amp; s['.name'] == s2['.name']) {
3677 if (s2['.anonymous'] == false &amp;&amp; netstate.section.charAt(0) == '@')
3678 return null;
3679
3680 return [ radioname, _state.radios[radioname], netstate ];
3681 }
3682 }
3683 }
3684 }
3685
3686 return null;
3687 }
3688
3689 function getWifiStateByIfname(ifname) {
3690 for (var radioname in _state.radios) {
3691 for (var i = 0; i &lt; _state.radios[radioname].interfaces.length; i++) {
3692 var netstate = _state.radios[radioname].interfaces[i];
3693
3694 if (typeof(netstate.ifname) != 'string')
3695 continue;
3696
3697 if (netstate.ifname == ifname)
3698 return [ radioname, _state.radios[radioname], netstate ];
3699 }
3700 }
3701
3702 return null;
3703 }
3704
3705 function isWifiIfname(ifname) {
3706 for (var i = 0; i &lt; iface_patterns_wireless.length; i++)
3707 if (iface_patterns_wireless[i].test(ifname))
3708 return true;
3709
3710 return false;
3711 }
3712
3713 function getWifiSidByNetid(netid) {
3714 var m = /^(\w+)\.network(\d+)$/.exec(netid);
3715 if (m) {
3716 var sections = uci.sections('wireless', 'wifi-iface');
3717 for (var i = 0, n = 0; i &lt; sections.length; i++) {
3718 if (sections[i].device != m[1])
3719 continue;
3720
3721 if (++n == +m[2])
3722 return sections[i]['.name'];
3723 }
3724 }
3725
3726 return null;
3727 }
3728
3729 function getWifiSidByIfname(ifname) {
3730 var sid = getWifiSidByNetid(ifname);
3731
3732 if (sid != null)
3733 return sid;
3734
3735 var res = getWifiStateByIfname(ifname);
3736
3737 if (res != null &amp;&amp; L.isObject(res[2]) &amp;&amp; typeof(res[2].section) == 'string')
3738 return res[2].section;
3739
3740 return null;
3741 }
3742
3743 function getWifiNetidBySid(sid) {
3744 var s = uci.get('wireless', sid);
3745 if (s != null &amp;&amp; s['.type'] == 'wifi-iface') {
3746 var radioname = s.device;
3747 if (typeof(radioname) == 'string') {
3748 var sections = uci.sections('wireless', 'wifi-iface');
3749 for (var i = 0, n = 0; i &lt; sections.length; i++) {
3750 if (sections[i].device != s.device)
3751 continue;
3752
3753 n++;
3754
3755 if (sections[i]['.name'] != s['.name'])
3756 continue;
3757
3758 return [ '%s.network%d'.format(s.device, n), s.device ];
3759 }
3760
3761 }
3762 }
3763
3764 return null;
3765 }
3766
3767 function getWifiNetidByNetname(name) {
3768 var sections = uci.sections('wireless', 'wifi-iface');
3769 for (var i = 0; i &lt; sections.length; i++) {
3770 if (typeof(sections[i].network) != 'string')
3771 continue;
3772
3773 var nets = sections[i].network.split(/\s+/);
3774 for (var j = 0; j &lt; nets.length; j++) {
3775 if (nets[j] != name)
3776 continue;
3777
3778 return getWifiNetidBySid(sections[i]['.name']);
3779 }
3780 }
3781
3782 return null;
3783 }
3784
3785 function isVirtualIfname(ifname) {
3786 for (var i = 0; i &lt; iface_patterns_virtual.length; i++)
3787 if (iface_patterns_virtual[i].test(ifname))
3788 return true;
3789
3790 return false;
3791 }
3792
3793 function isIgnoredIfname(ifname) {
3794 for (var i = 0; i &lt; iface_patterns_ignore.length; i++)
3795 if (iface_patterns_ignore[i].test(ifname))
3796 return true;
3797
3798 return false;
3799 }
3800
3801 function appendValue(config, section, option, value) {
3802 var values = uci.get(config, section, option),
3803 isArray = Array.isArray(values),
3804 rv = false;
3805
3806 if (isArray == false)
3807 values = L.toArray(values);
3808
3809 if (values.indexOf(value) == -1) {
3810 values.push(value);
3811 rv = true;
3812 }
3813
3814 uci.set(config, section, option, isArray ? values : values.join(' '));
3815
3816 return rv;
3817 }
3818
3819 function removeValue(config, section, option, value) {
3820 var values = uci.get(config, section, option),
3821 isArray = Array.isArray(values),
3822 rv = false;
3823
3824 if (isArray == false)
3825 values = L.toArray(values);
3826
3827 for (var i = values.length - 1; i >= 0; i--) {
3828 if (values[i] == value) {
3829 values.splice(i, 1);
3830 rv = true;
3831 }
3832 }
3833
3834 if (values.length > 0)
3835 uci.set(config, section, option, isArray ? values : values.join(' '));
3836 else
3837 uci.unset(config, section, option);
3838
3839 return rv;
3840 }
3841
3842 function prefixToMask(bits, v6) {
3843 var w = v6 ? 128 : 32,
3844 m = [];
3845
3846 if (bits > w)
3847 return null;
3848
3849 for (var i = 0; i &lt; w / 16; i++) {
3850 var b = Math.min(16, bits);
3851 m.push((0xffff &lt;&lt; (16 - b)) &amp; 0xffff);
3852 bits -= b;
3853 }
3854
3855 if (v6)
3856 return String.prototype.format.apply('%x:%x:%x:%x:%x:%x:%x:%x', m).replace(/:0(?::0)+$/, '::');
3857 else
3858 return '%d.%d.%d.%d'.format(m[0] >>> 8, m[0] &amp; 0xff, m[1] >>> 8, m[1] &amp; 0xff);
3859 }
3860
3861 function maskToPrefix(mask, v6) {
3862 var m = v6 ? validation.parseIPv6(mask) : validation.parseIPv4(mask);
3863
3864 if (!m)
3865 return null;
3866
3867 var bits = 0;
3868
3869 for (var i = 0, z = false; i &lt; m.length; i++) {
3870 z = z || !m[i];
3871
3872 while (!z &amp;&amp; (m[i] &amp; (v6 ? 0x8000 : 0x80))) {
3873 m[i] = (m[i] &lt;&lt; 1) &amp; (v6 ? 0xffff : 0xff);
3874 bits++;
3875 }
3876
3877 if (m[i])
3878 return null;
3879 }
3880
3881 return bits;
3882 }
3883
3884 function initNetworkState(refresh) {
3885 if (_state == null || refresh) {
3886 _init = _init || Promise.all([
3887 L.resolveDefault(callNetworkInterfaceDump(), []),
3888 L.resolveDefault(callLuciBoardJSON(), {}),
3889 L.resolveDefault(callLuciNetworkDevices(), {}),
3890 L.resolveDefault(callLuciWirelessDevices(), {}),
3891 L.resolveDefault(callLuciHostHints(), {}),
3892 getProtocolHandlers(),
3893 L.resolveDefault(uci.load('network')),
3894 L.resolveDefault(uci.load('wireless')),
3895 L.resolveDefault(uci.load('luci'))
3896 ]).then(function(data) {
3897 var netifd_ifaces = data[0],
3898 board_json = data[1],
3899 luci_devs = data[2];
3900
3901 var s = {
3902 isTunnel: {}, isBridge: {}, isSwitch: {}, isWifi: {},
3903 ifaces: netifd_ifaces, radios: data[3], hosts: data[4],
3904 netdevs: {}, bridges: {}, switches: {}, hostapd: {}
3905 };
3906
3907 for (var name in luci_devs) {
3908 var dev = luci_devs[name];
3909
3910 if (isVirtualIfname(name))
3911 s.isTunnel[name] = true;
3912
3913 if (!s.isTunnel[name] &amp;&amp; isIgnoredIfname(name))
3914 continue;
3915
3916 s.netdevs[name] = s.netdevs[name] || {
3917 idx: dev.ifindex,
3918 name: name,
3919 rawname: name,
3920 flags: dev.flags,
3921 link: dev.link,
3922 stats: dev.stats,
3923 macaddr: dev.mac,
3924 type: dev.type,
3925 devtype: dev.devtype,
3926 mtu: dev.mtu,
3927 qlen: dev.qlen,
3928 wireless: dev.wireless,
3929 parent: dev.parent,
3930 ipaddrs: [],
3931 ip6addrs: []
3932 };
3933
3934 if (Array.isArray(dev.ipaddrs))
3935 for (var i = 0; i &lt; dev.ipaddrs.length; i++)
3936 s.netdevs[name].ipaddrs.push(dev.ipaddrs[i].address + '/' + dev.ipaddrs[i].netmask);
3937
3938 if (Array.isArray(dev.ip6addrs))
3939 for (var i = 0; i &lt; dev.ip6addrs.length; i++)
3940 s.netdevs[name].ip6addrs.push(dev.ip6addrs[i].address + '/' + dev.ip6addrs[i].netmask);
3941 }
3942
3943 for (var name in luci_devs) {
3944 var dev = luci_devs[name];
3945
3946 if (!dev.bridge)
3947 continue;
3948
3949 var b = {
3950 name: name,
3951 id: dev.id,
3952 stp: dev.stp,
3953 ifnames: []
3954 };
3955
3956 for (var i = 0; dev.ports &amp;&amp; i &lt; dev.ports.length; i++) {
3957 var subdev = s.netdevs[dev.ports[i]];
3958
3959 if (subdev == null)
3960 continue;
3961
3962 b.ifnames.push(subdev);
3963 subdev.bridge = b;
3964 }
3965
3966 s.bridges[name] = b;
3967 s.isBridge[name] = true;
3968 }
3969
3970 for (var name in luci_devs) {
3971 var dev = luci_devs[name];
3972
3973 if (!dev.parent || dev.devtype != 'dsa')
3974 continue;
3975
3976 s.isSwitch[dev.parent] = true;
3977 s.isSwitch[name] = true;
3978 }
3979
3980 if (L.isObject(board_json.switch)) {
3981 for (var switchname in board_json.switch) {
3982 var layout = board_json.switch[switchname],
3983 netdevs = {},
3984 nports = {},
3985 ports = [],
3986 pnum = null,
3987 role = null;
3988
3989 if (L.isObject(layout) &amp;&amp; Array.isArray(layout.ports)) {
3990 for (var i = 0, port; (port = layout.ports[i]) != null; i++) {
3991 if (typeof(port) == 'object' &amp;&amp; typeof(port.num) == 'number' &amp;&amp;
3992 (typeof(port.role) == 'string' || typeof(port.device) == 'string')) {
3993 var spec = {
3994 num: port.num,
3995 role: port.role || 'cpu',
3996 index: (port.index != null) ? port.index : port.num
3997 };
3998
3999 if (port.device != null) {
4000 spec.device = port.device;
4001 spec.tagged = spec.need_tag;
4002 netdevs[port.num] = port.device;
4003 }
4004
4005 ports.push(spec);
4006
4007 if (port.role != null)
4008 nports[port.role] = (nports[port.role] || 0) + 1;
4009 }
4010 }
4011
4012 ports.sort(function(a, b) {
4013 return L.naturalCompare(a.role, b.role) || L.naturalCompare(a.index, b.index);
4014 });
4015
4016 for (var i = 0, port; (port = ports[i]) != null; i++) {
4017 if (port.role != role) {
4018 role = port.role;
4019 pnum = 1;
4020 }
4021
4022 if (role == 'cpu')
4023 port.label = 'CPU (%s)'.format(port.device);
4024 else if (nports[role] > 1)
4025 port.label = '%s %d'.format(role.toUpperCase(), pnum++);
4026 else
4027 port.label = role.toUpperCase();
4028
4029 delete port.role;
4030 delete port.index;
4031 }
4032
4033 s.switches[switchname] = {
4034 ports: ports,
4035 netdevs: netdevs
4036 };
4037 }
4038 }
4039 }
4040
4041 if (L.isObject(board_json.dsl) &amp;&amp; L.isObject(board_json.dsl.modem)) {
4042 s.hasDSLModem = board_json.dsl.modem;
4043 }
4044
4045 _init = null;
4046
4047 var objects = [];
4048
4049 if (L.isObject(s.radios))
4050 for (var radio in s.radios)
4051 if (L.isObject(s.radios[radio]) &amp;&amp; Array.isArray(s.radios[radio].interfaces))
4052 for (var i = 0; i &lt; s.radios[radio].interfaces.length; i++)
4053 if (L.isObject(s.radios[radio].interfaces[i]) &amp;&amp; s.radios[radio].interfaces[i].ifname)
4054 objects.push('hostapd.%s'.format(s.radios[radio].interfaces[i].ifname));
4055
4056 return (objects.length ? L.resolveDefault(rpc.list.apply(rpc, objects), {}) : Promise.resolve({})).then(function(res) {
4057 for (var k in res) {
4058 var m = k.match(/^hostapd\.(.+)$/);
4059 if (m)
4060 s.hostapd[m[1]] = res[k];
4061 }
4062
4063 return (_state = s);
4064 });
4065 });
4066 }
4067
4068 return (_state != null ? Promise.resolve(_state) : _init);
4069 }
4070
4071 function ifnameOf(obj) {
4072 if (obj instanceof Protocol)
4073 return obj.getIfname();
4074 else if (obj instanceof Device)
4075 return obj.getName();
4076 else if (obj instanceof WifiDevice)
4077 return obj.getName();
4078 else if (obj instanceof WifiNetwork)
4079 return obj.getIfname();
4080 else if (typeof(obj) == 'string')
4081 return obj.replace(/:.+$/, '');
4082
4083 return null;
4084 }
4085
4086 function networkSort(a, b) {
4087 return L.naturalCompare(a.getName(), b.getName());
4088 }
4089
4090 function deviceSort(a, b) {
4091 var typeWeigth = { wifi: 2, alias: 3 };
4092
4093 return L.naturalCompare(typeWeigth[a.getType()] || 1, typeWeigth[b.getType()] || 1) ||
4094 L.naturalCompare(a.getName(), b.getName());
4095 }
4096
4097 function formatWifiEncryption(enc) {
4098 if (!L.isObject(enc))
4099 return null;
4100
4101 if (!enc.enabled)
4102 return 'None';
4103
4104 var ciphers = Array.isArray(enc.ciphers)
4105 ? enc.ciphers.map(function(c) { return c.toUpperCase() }) : [ 'NONE' ];
4106
4107 if (Array.isArray(enc.wep)) {
4108 var has_open = false,
4109 has_shared = false;
4110
4111 for (var i = 0; i &lt; enc.wep.length; i++)
4112 if (enc.wep[i] == 'open')
4113 has_open = true;
4114 else if (enc.wep[i] == 'shared')
4115 has_shared = true;
4116
4117 if (has_open &amp;&amp; has_shared)
4118 return 'WEP Open/Shared (%s)'.format(ciphers.join(', '));
4119 else if (has_open)
4120 return 'WEP Open System (%s)'.format(ciphers.join(', '));
4121 else if (has_shared)
4122 return 'WEP Shared Auth (%s)'.format(ciphers.join(', '));
4123
4124 return 'WEP';
4125 }
4126
4127 if (Array.isArray(enc.wpa)) {
4128 var versions = [],
4129 suites = Array.isArray(enc.authentication)
4130 ? enc.authentication.map(function(a) { return a.toUpperCase() }) : [ 'NONE' ];
4131
4132 for (var i = 0; i &lt; enc.wpa.length; i++)
4133 switch (enc.wpa[i]) {
4134 case 1:
4135 versions.push('WPA');
4136 break;
4137
4138 default:
4139 versions.push('WPA%d'.format(enc.wpa[i]));
4140 break;
4141 }
4142
4143 if (versions.length > 1)
4144 return 'mixed %s %s (%s)'.format(versions.join('/'), suites.join(', '), ciphers.join(', '));
4145
4146 return '%s %s (%s)'.format(versions[0], suites.join(', '), ciphers.join(', '));
4147 }
4148
4149 return 'Unknown';
4150 }
4151
4152 function enumerateNetworks() {
4153 var uciInterfaces = uci.sections('network', 'interface'),
4154 networks = {};
4155
4156 for (var i = 0; i &lt; uciInterfaces.length; i++)
4157 networks[uciInterfaces[i]['.name']] = this.instantiateNetwork(uciInterfaces[i]['.name']);
4158
4159 for (var i = 0; i &lt; _state.ifaces.length; i++)
4160 if (networks[_state.ifaces[i].interface] == null)
4161 networks[_state.ifaces[i].interface] =
4162 this.instantiateNetwork(_state.ifaces[i].interface, _state.ifaces[i].proto);
4163
4164 var rv = [];
4165
4166 for (var network in networks)
4167 if (networks.hasOwnProperty(network))
4168 rv.push(networks[network]);
4169
4170 rv.sort(networkSort);
4171
4172 return rv;
4173 }
4174
4175
4176 var Hosts, Network, Protocol, Device, WifiDevice, WifiNetwork;
4177
4178 /**
4179 * @class network
4180 * @memberof LuCI
4181 * @hideconstructor
4182 * @classdesc
4183 *
4184 * The `LuCI.network` class combines data from multiple `ubus` APIs to
4185 * provide an abstraction of the current network configuration state.
4186 *
4187 * It provides methods to enumerate interfaces and devices, to query
4188 * current configuration details and to manipulate settings.
4189 */
4190 Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
4191 /**
4192 * Converts the given prefix size in bits to a netmask.
4193 *
4194 * @method
4195 *
4196 * @param {number} bits
4197 * The prefix size in bits.
4198 *
4199 * @param {boolean} [v6=false]
4200 * Whether to convert the bits value into an IPv4 netmask (`false`) or
4201 * an IPv6 netmask (`true`).
4202 *
4203 * @returns {null|string}
4204 * Returns a string containing the netmask corresponding to the bit count
4205 * or `null` when the given amount of bits exceeds the maximum possible
4206 * value of `32` for IPv4 or `128` for IPv6.
4207 */
4208 prefixToMask: prefixToMask,
4209
4210 /**
4211 * Converts the given netmask to a prefix size in bits.
4212 *
4213 * @method
4214 *
4215 * @param {string} netmask
4216 * The netmask to convert into a bits count.
4217 *
4218 * @param {boolean} [v6=false]
4219 * Whether to parse the given netmask as IPv4 (`false`) or IPv6 (`true`)
4220 * address.
4221 *
4222 * @returns {null|number}
4223 * Returns the number of prefix bits contained in the netmask or `null`
4224 * if the given netmask value was invalid.
4225 */
4226 maskToPrefix: maskToPrefix,
4227
4228 /**
4229 * An encryption entry describes active wireless encryption settings
4230 * such as the used key management protocols, active ciphers and
4231 * protocol versions.
4232 *
4233 * @typedef {Object&lt;string, boolean|Array&lt;number|string>>} LuCI.network.WifiEncryption
4234 * @memberof LuCI.network
4235 *
4236 * @property {boolean} enabled
4237 * Specifies whether any kind of encryption, such as `WEP` or `WPA` is
4238 * enabled. If set to `false`, then no encryption is active and the
4239 * corresponding network is open.
4240 *
4241 * @property {string[]} [wep]
4242 * When the `wep` property exists, the network uses WEP encryption.
4243 * In this case, the property is set to an array of active WEP modes
4244 * which might be either `open`, `shared` or both.
4245 *
4246 * @property {number[]} [wpa]
4247 * When the `wpa` property exists, the network uses WPA security.
4248 * In this case, the property is set to an array containing the WPA
4249 * protocol versions used, e.g. `[ 1, 2 ]` for WPA/WPA2 mixed mode or
4250 * `[ 3 ]` for WPA3-SAE.
4251 *
4252 * @property {string[]} [authentication]
4253 * The `authentication` property only applies to WPA encryption and
4254 * is defined when the `wpa` property is set as well. It points to
4255 * an array of active authentication suites used by the network, e.g.
4256 * `[ "psk" ]` for a WPA(2)-PSK network or `[ "psk", "sae" ]` for
4257 * mixed WPA2-PSK/WPA3-SAE encryption.
4258 *
4259 * @property {string[]} [ciphers]
4260 * If either WEP or WPA encryption is active, then the `ciphers`
4261 * property will be set to an array describing the active encryption
4262 * ciphers used by the network, e.g. `[ "tkip", "ccmp" ]` for a
4263 * WPA/WPA2-PSK mixed network or `[ "wep-40", "wep-104" ]` for an
4264 * WEP network.
4265 */
4266
4267 /**
4268 * Converts a given {@link LuCI.network.WifiEncryption encryption entry}
4269 * into a human readable string such as `mixed WPA/WPA2 PSK (TKIP, CCMP)`
4270 * or `WPA3 SAE (CCMP)`.
4271 *
4272 * @method
4273 *
4274 * @param {LuCI.network.WifiEncryption} encryption
4275 * The wireless encryption entry to convert.
4276 *
4277 * @returns {null|string}
4278 * Returns the description string for the given encryption entry or
4279 * `null` if the given entry was invalid.
4280 */
4281 formatWifiEncryption: formatWifiEncryption,
4282
4283 /**
4284 * Flushes the local network state cache and fetches updated information
4285 * from the remote `ubus` apis.
4286 *
4287 * @returns {Promise&lt;Object>}
4288 * Returns a promise resolving to the internal network state object.
4289 */
4290 flushCache: function() {
4291 initNetworkState(true);
4292 return _init;
4293 },
4294
4295 /**
4296 * Instantiates the given {@link LuCI.network.Protocol Protocol} back-end,
4297 * optionally using the given network name.
4298 *
4299 * @param {string} protoname
4300 * The protocol back-end to use, e.g. `static` or `dhcp`.
4301 *
4302 * @param {string} [netname=__dummy__]
4303 * The network name to use for the instantiated protocol. This should be
4304 * usually set to one of the interfaces described in /etc/config/network
4305 * but it is allowed to omit it, e.g. to query protocol capabilities
4306 * without the need for an existing interface.
4307 *
4308 * @returns {null|LuCI.network.Protocol}
4309 * Returns the instantiated protocol back-end class or `null` if the given
4310 * protocol isn't known.
4311 */
4312 getProtocol: function(protoname, netname) {
4313 var v = _protocols[protoname];
4314 if (v != null)
4315 return new v(netname || '__dummy__');
4316
4317 return null;
4318 },
4319
4320 /**
4321 * Obtains instances of all known {@link LuCI.network.Protocol Protocol}
4322 * back-end classes.
4323 *
4324 * @returns {Array&lt;LuCI.network.Protocol>}
4325 * Returns an array of protocol class instances.
4326 */
4327 getProtocols: function() {
4328 var rv = [];
4329
4330 for (var protoname in _protocols)
4331 rv.push(new _protocols[protoname]('__dummy__'));
4332
4333 return rv;
4334 },
4335
4336 /**
4337 * Registers a new {@link LuCI.network.Protocol Protocol} subclass
4338 * with the given methods and returns the resulting subclass value.
4339 *
4340 * This functions internally calls
4341 * {@link LuCI.Class.extend Class.extend()} on the `Network.Protocol`
4342 * base class.
4343 *
4344 * @param {string} protoname
4345 * The name of the new protocol to register.
4346 *
4347 * @param {Object&lt;string, *>} methods
4348 * The member methods and values of the new `Protocol` subclass to
4349 * be passed to {@link LuCI.Class.extend Class.extend()}.
4350 *
4351 * @returns {LuCI.network.Protocol}
4352 * Returns the new `Protocol` subclass.
4353 */
4354 registerProtocol: function(protoname, methods) {
4355 var spec = L.isObject(_protospecs) ? _protospecs[protoname] : null;
4356 var proto = Protocol.extend(Object.assign({
4357 getI18n: function() {
4358 return protoname;
4359 },
4360
4361 isFloating: function() {
4362 return false;
4363 },
4364
4365 isVirtual: function() {
4366 return (L.isObject(spec) &amp;&amp; spec.no_device == true);
4367 },
4368
4369 renderFormOptions: function(section) {
4370
4371 }
4372 }, methods, {
4373 __init__: function(name) {
4374 this.sid = name;
4375 },
4376
4377 getProtocol: function() {
4378 return protoname;
4379 }
4380 }));
4381
4382 _protocols[protoname] = proto;
4383
4384 return proto;
4385 },
4386
4387 /**
4388 * Registers a new regular expression pattern to recognize
4389 * virtual interfaces.
4390 *
4391 * @param {RegExp} pat
4392 * A `RegExp` instance to match a virtual interface name
4393 * such as `6in4-wan` or `tun0`.
4394 */
4395 registerPatternVirtual: function(pat) {
4396 iface_patterns_virtual.push(pat);
4397 },
4398
4399 /**
4400 * Registers a new human readable translation string for a `Protocol`
4401 * error code.
4402 *
4403 * @param {string} code
4404 * The `ubus` protocol error code to register a translation for, e.g.
4405 * `NO_DEVICE`.
4406 *
4407 * @param {string} message
4408 * The message to use as translation for the given protocol error code.
4409 *
4410 * @returns {boolean}
4411 * Returns `true` if the error code description has been added or `false`
4412 * if either the arguments were invalid or if there already was a
4413 * description for the given code.
4414 */
4415 registerErrorCode: function(code, message) {
4416 if (typeof(code) == 'string' &amp;&amp;
4417 typeof(message) == 'string' &amp;&amp;
4418 !proto_errors.hasOwnProperty(code)) {
4419 proto_errors[code] = message;
4420 return true;
4421 }
4422
4423 return false;
4424 },
4425
4426 /**
4427 * Adds a new network of the given name and update it with the given
4428 * uci option values.
4429 *
4430 * If a network with the given name already exist but is empty, then
4431 * this function will update its option, otherwise it will do nothing.
4432 *
4433 * @param {string} name
4434 * The name of the network to add. Must be in the format `[a-zA-Z0-9_]+`.
4435 *
4436 * @param {Object&lt;string, string|string[]>} [options]
4437 * An object of uci option values to set on the new network or to
4438 * update in an existing, empty network.
4439 *
4440 * @returns {Promise&lt;null|LuCI.network.Protocol>}
4441 * Returns a promise resolving to the `Protocol` subclass instance
4442 * describing the added network or resolving to `null` if the name
4443 * was invalid or if a non-empty network of the given name already
4444 * existed.
4445 */
4446 addNetwork: function(name, options) {
4447 return this.getNetwork(name).then(L.bind(function(existingNetwork) {
4448 if (name != null &amp;&amp; /^[a-zA-Z0-9_]+$/.test(name) &amp;&amp; existingNetwork == null) {
4449 var sid = uci.add('network', 'interface', name);
4450
4451 if (sid != null) {
4452 if (L.isObject(options))
4453 for (var key in options)
4454 if (options.hasOwnProperty(key))
4455 uci.set('network', sid, key, options[key]);
4456
4457 return this.instantiateNetwork(sid);
4458 }
4459 }
4460 else if (existingNetwork != null &amp;&amp; existingNetwork.isEmpty()) {
4461 if (L.isObject(options))
4462 for (var key in options)
4463 if (options.hasOwnProperty(key))
4464 existingNetwork.set(key, options[key]);
4465
4466 return existingNetwork;
4467 }
4468 }, this));
4469 },
4470
4471 /**
4472 * Get a {@link LuCI.network.Protocol Protocol} instance describing
4473 * the network with the given name.
4474 *
4475 * @param {string} name
4476 * The logical interface name of the network get, e.g. `lan` or `wan`.
4477 *
4478 * @returns {Promise&lt;null|LuCI.network.Protocol>}
4479 * Returns a promise resolving to a
4480 * {@link LuCI.network.Protocol Protocol} subclass instance describing
4481 * the network or `null` if the network did not exist.
4482 */
4483 getNetwork: function(name) {
4484 return initNetworkState().then(L.bind(function() {
4485 var section = (name != null) ? uci.get('network', name) : null;
4486
4487 if (section != null &amp;&amp; section['.type'] == 'interface') {
4488 return this.instantiateNetwork(name);
4489 }
4490 else if (name != null) {
4491 for (var i = 0; i &lt; _state.ifaces.length; i++)
4492 if (_state.ifaces[i].interface == name)
4493 return this.instantiateNetwork(name, _state.ifaces[i].proto);
4494 }
4495
4496 return null;
4497 }, this));
4498 },
4499
4500 /**
4501 * Gets an array containing all known networks.
4502 *
4503 * @returns {Promise&lt;Array&lt;LuCI.network.Protocol>>}
4504 * Returns a promise resolving to a name-sorted array of
4505 * {@link LuCI.network.Protocol Protocol} subclass instances
4506 * describing all known networks.
4507 */
4508 getNetworks: function() {
4509 return initNetworkState().then(L.bind(enumerateNetworks, this));
4510 },
4511
4512 /**
4513 * Deletes the given network and its references from the network and
4514 * firewall configuration.
4515 *
4516 * @param {string} name
4517 * The name of the network to delete.
4518 *
4519 * @returns {Promise&lt;boolean>}
4520 * Returns a promise resolving to either `true` if the network and
4521 * references to it were successfully deleted from the configuration or
4522 * `false` if the given network could not be found.
4523 */
4524 deleteNetwork: function(name) {
4525 var requireFirewall = Promise.resolve(L.require('firewall')).catch(function() {}),
4526 loadDHCP = L.resolveDefault(uci.load('dhcp')),
4527 network = this.instantiateNetwork(name);
4528
4529 return Promise.all([ requireFirewall, loadDHCP, initNetworkState() ]).then(function(res) {
4530 var uciInterface = uci.get('network', name),
4531 firewall = res[0];
4532
4533 if (uciInterface != null &amp;&amp; uciInterface['.type'] == 'interface') {
4534 return Promise.resolve(network ? network.deleteConfiguration() : null).then(function() {
4535 uci.remove('network', name);
4536
4537 uci.sections('luci', 'ifstate', function(s) {
4538 if (s.interface == name)
4539 uci.remove('luci', s['.name']);
4540 });
4541
4542 uci.sections('network', null, function(s) {
4543 switch (s['.type']) {
4544 case 'alias':
4545 case 'route':
4546 case 'route6':
4547 if (s.interface == name)
4548 uci.remove('network', s['.name']);
4549
4550 break;
4551
4552 case 'rule':
4553 case 'rule6':
4554 if (s.in == name || s.out == name)
4555 uci.remove('network', s['.name']);
4556
4557 break;
4558 }
4559 });
4560
4561 uci.sections('wireless', 'wifi-iface', function(s) {
4562 var networks = L.toArray(s.network).filter(function(network) { return network != name });
4563
4564 if (networks.length > 0)
4565 uci.set('wireless', s['.name'], 'network', networks.join(' '));
4566 else
4567 uci.unset('wireless', s['.name'], 'network');
4568 });
4569
4570 uci.sections('dhcp', 'dhcp', function(s) {
4571 if (s.interface == name)
4572 uci.remove('dhcp', s['.name']);
4573 });
4574
4575 if (firewall)
4576 return firewall.deleteNetwork(name).then(function() { return true });
4577
4578 return true;
4579 }).catch(function() {
4580 return false;
4581 });
4582 }
4583
4584 return false;
4585 });
4586 },
4587
4588 /**
4589 * Rename the given network and its references to a new name.
4590 *
4591 * @param {string} oldName
4592 * The current name of the network.
4593 *
4594 * @param {string} newName
4595 * The name to rename the network to, must be in the format
4596 * `[a-z-A-Z0-9_]+`.
4597 *
4598 * @returns {Promise&lt;boolean>}
4599 * Returns a promise resolving to either `true` if the network was
4600 * successfully renamed or `false` if the new name was invalid, if
4601 * a network with the new name already exists or if the network to
4602 * rename could not be found.
4603 */
4604 renameNetwork: function(oldName, newName) {
4605 return initNetworkState().then(function() {
4606 if (newName == null || !/^[a-zA-Z0-9_]+$/.test(newName) || uci.get('network', newName) != null)
4607 return false;
4608
4609 var oldNetwork = uci.get('network', oldName);
4610
4611 if (oldNetwork == null || oldNetwork['.type'] != 'interface')
4612 return false;
4613
4614 var sid = uci.add('network', 'interface', newName);
4615
4616 for (var key in oldNetwork)
4617 if (oldNetwork.hasOwnProperty(key) &amp;&amp; key.charAt(0) != '.')
4618 uci.set('network', sid, key, oldNetwork[key]);
4619
4620 uci.sections('luci', 'ifstate', function(s) {
4621 if (s.interface == oldName)
4622 uci.set('luci', s['.name'], 'interface', newName);
4623 });
4624
4625 uci.sections('network', 'alias', function(s) {
4626 if (s.interface == oldName)
4627 uci.set('network', s['.name'], 'interface', newName);
4628 });
4629
4630 uci.sections('network', 'route', function(s) {
4631 if (s.interface == oldName)
4632 uci.set('network', s['.name'], 'interface', newName);
4633 });
4634
4635 uci.sections('network', 'route6', function(s) {
4636 if (s.interface == oldName)
4637 uci.set('network', s['.name'], 'interface', newName);
4638 });
4639
4640 uci.sections('wireless', 'wifi-iface', function(s) {
4641 var networks = L.toArray(s.network).map(function(network) { return (network == oldName ? newName : network) });
4642
4643 if (networks.length > 0)
4644 uci.set('wireless', s['.name'], 'network', networks.join(' '));
4645 });
4646
4647 uci.remove('network', oldName);
4648
4649 return true;
4650 });
4651 },
4652
4653 /**
4654 * Get a {@link LuCI.network.Device Device} instance describing the
4655 * given network device.
4656 *
4657 * @param {string} name
4658 * The name of the network device to get, e.g. `eth0` or `br-lan`.
4659 *
4660 * @returns {Promise&lt;null|LuCI.network.Device>}
4661 * Returns a promise resolving to the `Device` instance describing
4662 * the network device or `null` if the given device name could not
4663 * be found.
4664 */
4665 getDevice: function(name) {
4666 return initNetworkState().then(L.bind(function() {
4667 if (name == null)
4668 return null;
4669
4670 if (_state.netdevs.hasOwnProperty(name))
4671 return this.instantiateDevice(name);
4672
4673 var netid = getWifiNetidBySid(name);
4674 if (netid != null)
4675 return this.instantiateDevice(netid[0]);
4676
4677 return null;
4678 }, this));
4679 },
4680
4681 /**
4682 * Get a sorted list of all found network devices.
4683 *
4684 * @returns {Promise&lt;Array&lt;LuCI.network.Device>>}
4685 * Returns a promise resolving to a sorted array of `Device` class
4686 * instances describing the network devices found on the system.
4687 */
4688 getDevices: function() {
4689 return initNetworkState().then(L.bind(function() {
4690 var devices = {};
4691
4692 /* find simple devices */
4693 var uciInterfaces = uci.sections('network', 'interface');
4694 for (var i = 0; i &lt; uciInterfaces.length; i++) {
4695 var ifnames = L.toArray(uciInterfaces[i].ifname);
4696
4697 for (var j = 0; j &lt; ifnames.length; j++) {
4698 if (ifnames[j].charAt(0) == '@')
4699 continue;
4700
4701 if (isIgnoredIfname(ifnames[j]) || isVirtualIfname(ifnames[j]) || isWifiIfname(ifnames[j]))
4702 continue;
4703
4704 devices[ifnames[j]] = this.instantiateDevice(ifnames[j]);
4705 }
4706 }
4707
4708 for (var ifname in _state.netdevs) {
4709 if (devices.hasOwnProperty(ifname))
4710 continue;
4711
4712 if (isIgnoredIfname(ifname) || isWifiIfname(ifname))
4713 continue;
4714
4715 if (_state.netdevs[ifname].wireless)
4716 continue;
4717
4718 devices[ifname] = this.instantiateDevice(ifname);
4719 }
4720
4721 /* find VLAN devices */
4722 var uciSwitchVLANs = uci.sections('network', 'switch_vlan');
4723 for (var i = 0; i &lt; uciSwitchVLANs.length; i++) {
4724 if (typeof(uciSwitchVLANs[i].ports) != 'string' ||
4725 typeof(uciSwitchVLANs[i].device) != 'string' ||
4726 !_state.switches.hasOwnProperty(uciSwitchVLANs[i].device))
4727 continue;
4728
4729 var ports = uciSwitchVLANs[i].ports.split(/\s+/);
4730 for (var j = 0; j &lt; ports.length; j++) {
4731 var m = ports[j].match(/^(\d+)([tu]?)$/);
4732 if (m == null)
4733 continue;
4734
4735 var netdev = _state.switches[uciSwitchVLANs[i].device].netdevs[m[1]];
4736 if (netdev == null)
4737 continue;
4738
4739 if (!devices.hasOwnProperty(netdev))
4740 devices[netdev] = this.instantiateDevice(netdev);
4741
4742 _state.isSwitch[netdev] = true;
4743
4744 if (m[2] != 't')
4745 continue;
4746
4747 var vid = uciSwitchVLANs[i].vid || uciSwitchVLANs[i].vlan;
4748 vid = (vid != null ? +vid : null);
4749
4750 if (vid == null || vid &lt; 0 || vid > 4095)
4751 continue;
4752
4753 var vlandev = '%s.%d'.format(netdev, vid);
4754
4755 if (!devices.hasOwnProperty(vlandev))
4756 devices[vlandev] = this.instantiateDevice(vlandev);
4757
4758 _state.isSwitch[vlandev] = true;
4759 }
4760 }
4761
4762 /* find bridge VLAN devices */
4763 var uciBridgeVLANs = uci.sections('network', 'bridge-vlan');
4764 for (var i = 0; i &lt; uciBridgeVLANs.length; i++) {
4765 var basedev = uciBridgeVLANs[i].device,
4766 local = uciBridgeVLANs[i].local,
4767 alias = uciBridgeVLANs[i].alias,
4768 vid = +uciBridgeVLANs[i].vlan,
4769 ports = L.toArray(uciBridgeVLANs[i].ports);
4770
4771 if (local == '0')
4772 continue;
4773
4774 if (isNaN(vid) || vid &lt; 0 || vid > 4095)
4775 continue;
4776
4777 var vlandev = '%s.%s'.format(basedev, alias || vid);
4778
4779 _state.isBridge[basedev] = true;
4780
4781 if (!_state.bridges.hasOwnProperty(basedev))
4782 _state.bridges[basedev] = {
4783 name: basedev,
4784 ifnames: []
4785 };
4786
4787 if (!devices.hasOwnProperty(vlandev))
4788 devices[vlandev] = this.instantiateDevice(vlandev);
4789
4790 ports.forEach(function(port_name) {
4791 var m = port_name.match(/^([^:]+)(?::[ut*]+)?$/),
4792 p = m ? m[1] : null;
4793
4794 if (!p)
4795 return;
4796
4797 if (_state.bridges[basedev].ifnames.filter(function(sd) { return sd.name == p }).length)
4798 return;
4799
4800 _state.netdevs[p] = _state.netdevs[p] || {
4801 name: p,
4802 ipaddrs: [],
4803 ip6addrs: [],
4804 type: 1,
4805 devtype: 'ethernet',
4806 stats: {},
4807 flags: {}
4808 };
4809
4810 _state.bridges[basedev].ifnames.push(_state.netdevs[p]);
4811 _state.netdevs[p].bridge = _state.bridges[basedev];
4812 });
4813 }
4814
4815 /* find wireless interfaces */
4816 var uciWifiIfaces = uci.sections('wireless', 'wifi-iface'),
4817 networkCount = {};
4818
4819 for (var i = 0; i &lt; uciWifiIfaces.length; i++) {
4820 if (typeof(uciWifiIfaces[i].device) != 'string')
4821 continue;
4822
4823 networkCount[uciWifiIfaces[i].device] = (networkCount[uciWifiIfaces[i].device] || 0) + 1;
4824
4825 var netid = '%s.network%d'.format(uciWifiIfaces[i].device, networkCount[uciWifiIfaces[i].device]);
4826
4827 devices[netid] = this.instantiateDevice(netid);
4828 }
4829
4830 /* find uci declared devices */
4831 var uciDevices = uci.sections('network', 'device');
4832
4833 for (var i = 0; i &lt; uciDevices.length; i++) {
4834 var type = uciDevices[i].type,
4835 name = uciDevices[i].name;
4836
4837 if (!type || !name || devices.hasOwnProperty(name))
4838 continue;
4839
4840 if (type == 'bridge')
4841 _state.isBridge[name] = true;
4842
4843 devices[name] = this.instantiateDevice(name);
4844 }
4845
4846 var rv = [];
4847
4848 for (var netdev in devices)
4849 if (devices.hasOwnProperty(netdev))
4850 rv.push(devices[netdev]);
4851
4852 rv.sort(deviceSort);
4853
4854 return rv;
4855 }, this));
4856 },
4857
4858 /**
4859 * Test if a given network device name is in the list of patterns for
4860 * device names to ignore.
4861 *
4862 * Ignored device names are usually Linux network devices which are
4863 * spawned implicitly by kernel modules such as `tunl0` or `hwsim0`
4864 * and which are unsuitable for use in network configuration.
4865 *
4866 * @param {string} name
4867 * The device name to test.
4868 *
4869 * @returns {boolean}
4870 * Returns `true` if the given name is in the ignore pattern list,
4871 * else returns `false`.
4872 */
4873 isIgnoredDevice: function(name) {
4874 return isIgnoredIfname(name);
4875 },
4876
4877 /**
4878 * Get a {@link LuCI.network.WifiDevice WifiDevice} instance describing
4879 * the given wireless radio.
4880 *
4881 * @param {string} devname
4882 * The configuration name of the wireless radio to look up, e.g. `radio0`
4883 * for the first mac80211 phy on the system.
4884 *
4885 * @returns {Promise&lt;null|LuCI.network.WifiDevice>}
4886 * Returns a promise resolving to the `WifiDevice` instance describing
4887 * the underlying radio device or `null` if the wireless radio could not
4888 * be found.
4889 */
4890 getWifiDevice: function(devname) {
4891 return initNetworkState().then(L.bind(function() {
4892 var existingDevice = uci.get('wireless', devname);
4893
4894 if (existingDevice == null || existingDevice['.type'] != 'wifi-device')
4895 return null;
4896
4897 return this.instantiateWifiDevice(devname, _state.radios[devname] || {});
4898 }, this));
4899 },
4900
4901 /**
4902 * Obtain a list of all configured radio devices.
4903 *
4904 * @returns {Promise&lt;Array&lt;LuCI.network.WifiDevice>>}
4905 * Returns a promise resolving to an array of `WifiDevice` instances
4906 * describing the wireless radios configured in the system.
4907 * The order of the array corresponds to the order of the radios in
4908 * the configuration.
4909 */
4910 getWifiDevices: function() {
4911 return initNetworkState().then(L.bind(function() {
4912 var uciWifiDevices = uci.sections('wireless', 'wifi-device'),
4913 rv = [];
4914
4915 for (var i = 0; i &lt; uciWifiDevices.length; i++) {
4916 var devname = uciWifiDevices[i]['.name'];
4917 rv.push(this.instantiateWifiDevice(devname, _state.radios[devname] || {}));
4918 }
4919
4920 return rv;
4921 }, this));
4922 },
4923
4924 /**
4925 * Get a {@link LuCI.network.WifiNetwork WifiNetwork} instance describing
4926 * the given wireless network.
4927 *
4928 * @param {string} netname
4929 * The name of the wireless network to look up. This may be either an uci
4930 * configuration section ID, a network ID in the form `radio#.network#`
4931 * or a Linux network device name like `wlan0` which is resolved to the
4932 * corresponding configuration section through `ubus` runtime information.
4933 *
4934 * @returns {Promise&lt;null|LuCI.network.WifiNetwork>}
4935 * Returns a promise resolving to the `WifiNetwork` instance describing
4936 * the wireless network or `null` if the corresponding network could not
4937 * be found.
4938 */
4939 getWifiNetwork: function(netname) {
4940 return initNetworkState()
4941 .then(L.bind(this.lookupWifiNetwork, this, netname));
4942 },
4943
4944 /**
4945 * Get an array of all {@link LuCI.network.WifiNetwork WifiNetwork}
4946 * instances describing the wireless networks present on the system.
4947 *
4948 * @returns {Promise&lt;Array&lt;LuCI.network.WifiNetwork>>}
4949 * Returns a promise resolving to an array of `WifiNetwork` instances
4950 * describing the wireless networks. The array will be empty if no networks
4951 * are found.
4952 */
4953 getWifiNetworks: function() {
4954 return initNetworkState().then(L.bind(function() {
4955 var wifiIfaces = uci.sections('wireless', 'wifi-iface'),
4956 rv = [];
4957
4958 for (var i = 0; i &lt; wifiIfaces.length; i++)
4959 rv.push(this.lookupWifiNetwork(wifiIfaces[i]['.name']));
4960
4961 rv.sort(function(a, b) {
4962 return L.naturalCompare(a.getID(), b.getID());
4963 });
4964
4965 return rv;
4966 }, this));
4967 },
4968
4969 /**
4970 * Adds a new wireless network to the configuration and sets its options
4971 * to the provided values.
4972 *
4973 * @param {Object&lt;string, string|string[]>} options
4974 * The options to set for the newly added wireless network. This object
4975 * must at least contain a `device` property which is set to the radio
4976 * name the new network belongs to.
4977 *
4978 * @returns {Promise&lt;null|LuCI.network.WifiNetwork>}
4979 * Returns a promise resolving to a `WifiNetwork` instance describing
4980 * the newly added wireless network or `null` if the given options
4981 * were invalid or if the associated radio device could not be found.
4982 */
4983 addWifiNetwork: function(options) {
4984 return initNetworkState().then(L.bind(function() {
4985 if (options == null ||
4986 typeof(options) != 'object' ||
4987 typeof(options.device) != 'string')
4988 return null;
4989
4990 var existingDevice = uci.get('wireless', options.device);
4991 if (existingDevice == null || existingDevice['.type'] != 'wifi-device')
4992 return null;
4993
4994 /* XXX: need to add a named section (wifinet#) here */
4995 var sid = uci.add('wireless', 'wifi-iface');
4996 for (var key in options)
4997 if (options.hasOwnProperty(key))
4998 uci.set('wireless', sid, key, options[key]);
4999
5000 var radioname = existingDevice['.name'],
5001 netid = getWifiNetidBySid(sid) || [];
5002
5003 return this.instantiateWifiNetwork(sid, radioname, _state.radios[radioname], netid[0], null);
5004 }, this));
5005 },
5006
5007 /**
5008 * Deletes the given wireless network from the configuration.
5009 *
5010 * @param {string} netname
5011 * The name of the network to remove. This may be either a
5012 * network ID in the form `radio#.network#` or a Linux network device
5013 * name like `wlan0` which is resolved to the corresponding configuration
5014 * section through `ubus` runtime information.
5015 *
5016 * @returns {Promise&lt;boolean>}
5017 * Returns a promise resolving to `true` if the wireless network has been
5018 * successfully deleted from the configuration or `false` if it could not
5019 * be found.
5020 */
5021 deleteWifiNetwork: function(netname) {
5022 return initNetworkState().then(L.bind(function() {
5023 var sid = getWifiSidByIfname(netname);
5024
5025 if (sid == null)
5026 return false;
5027
5028 uci.remove('wireless', sid);
5029 return true;
5030 }, this));
5031 },
5032
5033 /* private */
5034 getStatusByRoute: function(addr, mask) {
5035 return initNetworkState().then(L.bind(function() {
5036 var rv = [];
5037
5038 for (var i = 0; i &lt; _state.ifaces.length; i++) {
5039 if (!Array.isArray(_state.ifaces[i].route))
5040 continue;
5041
5042 for (var j = 0; j &lt; _state.ifaces[i].route.length; j++) {
5043 if (typeof(_state.ifaces[i].route[j]) != 'object' ||
5044 typeof(_state.ifaces[i].route[j].target) != 'string' ||
5045 typeof(_state.ifaces[i].route[j].mask) != 'number')
5046 continue;
5047
5048 if (_state.ifaces[i].route[j].table)
5049 continue;
5050
5051 if (_state.ifaces[i].route[j].target != addr ||
5052 _state.ifaces[i].route[j].mask != mask)
5053 continue;
5054
5055 rv.push(_state.ifaces[i]);
5056 }
5057 }
5058
5059 rv.sort(function(a, b) {
5060 return L.naturalCompare(a.metric, b.metric) || L.naturalCompare(a.interface, b.interface);
5061 });
5062
5063 return rv;
5064 }, this));
5065 },
5066
5067 /* private */
5068 getStatusByAddress: function(addr) {
5069 return initNetworkState().then(L.bind(function() {
5070 var rv = [];
5071
5072 for (var i = 0; i &lt; _state.ifaces.length; i++) {
5073 if (Array.isArray(_state.ifaces[i]['ipv4-address']))
5074 for (var j = 0; j &lt; _state.ifaces[i]['ipv4-address'].length; j++)
5075 if (typeof(_state.ifaces[i]['ipv4-address'][j]) == 'object' &amp;&amp;
5076 _state.ifaces[i]['ipv4-address'][j].address == addr)
5077 return _state.ifaces[i];
5078
5079 if (Array.isArray(_state.ifaces[i]['ipv6-address']))
5080 for (var j = 0; j &lt; _state.ifaces[i]['ipv6-address'].length; j++)
5081 if (typeof(_state.ifaces[i]['ipv6-address'][j]) == 'object' &amp;&amp;
5082 _state.ifaces[i]['ipv6-address'][j].address == addr)
5083 return _state.ifaces[i];
5084
5085 if (Array.isArray(_state.ifaces[i]['ipv6-prefix-assignment']))
5086 for (var j = 0; j &lt; _state.ifaces[i]['ipv6-prefix-assignment'].length; j++)
5087 if (typeof(_state.ifaces[i]['ipv6-prefix-assignment'][j]) == 'object' &amp;&amp;
5088 typeof(_state.ifaces[i]['ipv6-prefix-assignment'][j]['local-address']) == 'object' &amp;&amp;
5089 _state.ifaces[i]['ipv6-prefix-assignment'][j]['local-address'].address == addr)
5090 return _state.ifaces[i];
5091 }
5092
5093 return null;
5094 }, this));
5095 },
5096
5097 /**
5098 * Get IPv4 wan networks.
5099 *
5100 * This function looks up all networks having a default `0.0.0.0/0` route
5101 * and returns them as array.
5102 *
5103 * @returns {Promise&lt;Array&lt;LuCI.network.Protocol>>}
5104 * Returns a promise resolving to an array of `Protocol` subclass
5105 * instances describing the found default route interfaces.
5106 */
5107 getWANNetworks: function() {
5108 return this.getStatusByRoute('0.0.0.0', 0).then(L.bind(function(statuses) {
5109 var rv = [], seen = {};
5110
5111 for (var i = 0; i &lt; statuses.length; i++) {
5112 if (!seen.hasOwnProperty(statuses[i].interface)) {
5113 rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto));
5114 seen[statuses[i].interface] = true;
5115 }
5116 }
5117
5118 return rv;
5119 }, this));
5120 },
5121
5122 /**
5123 * Get IPv6 wan networks.
5124 *
5125 * This function looks up all networks having a default `::/0` route
5126 * and returns them as array.
5127 *
5128 * @returns {Promise&lt;Array&lt;LuCI.network.Protocol>>}
5129 * Returns a promise resolving to an array of `Protocol` subclass
5130 * instances describing the found IPv6 default route interfaces.
5131 */
5132 getWAN6Networks: function() {
5133 return this.getStatusByRoute('::', 0).then(L.bind(function(statuses) {
5134 var rv = [], seen = {};
5135
5136 for (var i = 0; i &lt; statuses.length; i++) {
5137 if (!seen.hasOwnProperty(statuses[i].interface)) {
5138 rv.push(this.instantiateNetwork(statuses[i].interface, statuses[i].proto));
5139 seen[statuses[i].interface] = true;
5140 }
5141 }
5142
5143 return rv;
5144 }, this));
5145 },
5146
5147 /**
5148 * Describes a swconfig switch topology by specifying the CPU
5149 * connections and external port labels of a switch.
5150 *
5151 * @typedef {Object&lt;string, Object|Array>} SwitchTopology
5152 * @memberof LuCI.network
5153 *
5154 * @property {Object&lt;number, string>} netdevs
5155 * The `netdevs` property points to an object describing the CPU port
5156 * connections of the switch. The numeric key of the enclosed object is
5157 * the port number, the value contains the Linux network device name the
5158 * port is hardwired to.
5159 *
5160 * @property {Array&lt;Object&lt;string, boolean|number|string>>} ports
5161 * The `ports` property points to an array describing the populated
5162 * ports of the switch in the external label order. Each array item is
5163 * an object containing the following keys:
5164 * - `num` - the internal switch port number
5165 * - `label` - the label of the port, e.g. `LAN 1` or `CPU (eth0)`
5166 * - `device` - the connected Linux network device name (CPU ports only)
5167 * - `tagged` - a boolean indicating whether the port must be tagged to
5168 * function (CPU ports only)
5169 */
5170
5171 /**
5172 * Returns the topologies of all swconfig switches found on the system.
5173 *
5174 * @returns {Promise&lt;Object&lt;string, LuCI.network.SwitchTopology>>}
5175 * Returns a promise resolving to an object containing the topologies
5176 * of each switch. The object keys correspond to the name of the switches
5177 * such as `switch0`, the values are
5178 * {@link LuCI.network.SwitchTopology SwitchTopology} objects describing
5179 * the layout.
5180 */
5181 getSwitchTopologies: function() {
5182 return initNetworkState().then(function() {
5183 return _state.switches;
5184 });
5185 },
5186
5187 /* private */
5188 instantiateNetwork: function(name, proto) {
5189 if (name == null)
5190 return null;
5191
5192 proto = (proto == null ? uci.get('network', name, 'proto') : proto);
5193
5194 var protoClass = _protocols[proto] || Protocol;
5195 return new protoClass(name);
5196 },
5197
5198 /* private */
5199 instantiateDevice: function(name, network, extend) {
5200 if (extend != null)
5201 return new (Device.extend(extend))(name, network);
5202
5203 return new Device(name, network);
5204 },
5205
5206 /* private */
5207 instantiateWifiDevice: function(radioname, radiostate) {
5208 return new WifiDevice(radioname, radiostate);
5209 },
5210
5211 /* private */
5212 instantiateWifiNetwork: function(sid, radioname, radiostate, netid, netstate, hostapd) {
5213 return new WifiNetwork(sid, radioname, radiostate, netid, netstate, hostapd);
5214 },
5215
5216 /* private */
5217 lookupWifiNetwork: function(netname) {
5218 var sid, res, netid, radioname, radiostate, netstate;
5219
5220 sid = getWifiSidByNetid(netname);
5221
5222 if (sid != null) {
5223 res = getWifiStateBySid(sid);
5224 netid = netname;
5225 radioname = res ? res[0] : null;
5226 radiostate = res ? res[1] : null;
5227 netstate = res ? res[2] : null;
5228 }
5229 else {
5230 res = getWifiStateByIfname(netname);
5231
5232 if (res != null) {
5233 radioname = res[0];
5234 radiostate = res[1];
5235 netstate = res[2];
5236 sid = netstate.section;
5237 netid = L.toArray(getWifiNetidBySid(sid))[0];
5238 }
5239 else {
5240 res = getWifiStateBySid(netname);
5241
5242 if (res != null) {
5243 radioname = res[0];
5244 radiostate = res[1];
5245 netstate = res[2];
5246 sid = netname;
5247 netid = L.toArray(getWifiNetidBySid(sid))[0];
5248 }
5249 else {
5250 res = getWifiNetidBySid(netname);
5251
5252 if (res != null) {
5253 netid = res[0];
5254 radioname = res[1];
5255 sid = netname;
5256 }
5257 }
5258 }
5259 }
5260
5261 return this.instantiateWifiNetwork(sid || netname, radioname,
5262 radiostate, netid, netstate,
5263 netstate ? _state.hostapd[netstate.ifname] : null);
5264 },
5265
5266 /**
5267 * Obtains the network device name of the given object.
5268 *
5269 * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} obj
5270 * The object to get the device name from.
5271 *
5272 * @returns {null|string}
5273 * Returns a string containing the device name or `null` if the given
5274 * object could not be converted to a name.
5275 */
5276 getIfnameOf: function(obj) {
5277 return ifnameOf(obj);
5278 },
5279
5280 /**
5281 * Queries the internal DSL modem type from board information.
5282 *
5283 * @returns {Promise&lt;null|string>}
5284 * Returns a promise resolving to the type of the internal modem
5285 * (e.g. `vdsl`) or to `null` if no internal modem is present.
5286 */
5287 getDSLModemType: function() {
5288 return initNetworkState().then(function() {
5289 return _state.hasDSLModem ? _state.hasDSLModem.type : null;
5290 });
5291 },
5292
5293 /**
5294 * Queries aggregated information about known hosts.
5295 *
5296 * This function aggregates information from various sources such as
5297 * DHCP lease databases, ARP and IPv6 neighbour entries, wireless
5298 * association list etc. and returns a {@link LuCI.network.Hosts Hosts}
5299 * class instance describing the found hosts.
5300 *
5301 * @returns {Promise&lt;LuCI.network.Hosts>}
5302 * Returns a `Hosts` instance describing host known on the system.
5303 */
5304 getHostHints: function() {
5305 return initNetworkState().then(function() {
5306 return new Hosts(_state.hosts);
5307 });
5308 }
5309 });
5310
5311 /**
5312 * @class
5313 * @memberof LuCI.network
5314 * @hideconstructor
5315 * @classdesc
5316 *
5317 * The `LuCI.network.Hosts` class encapsulates host information aggregated
5318 * from multiple sources and provides convenience functions to access the
5319 * host information by different criteria.
5320 */
5321 Hosts = baseclass.extend(/** @lends LuCI.network.Hosts.prototype */ {
5322 __init__: function(hosts) {
5323 this.hosts = hosts;
5324 },
5325
5326 /**
5327 * Look up the hostname associated with the given MAC address.
5328 *
5329 * @param {string} mac
5330 * The MAC address to look up.
5331 *
5332 * @returns {null|string}
5333 * Returns the hostname associated with the given MAC or `null` if
5334 * no matching host could be found or if no hostname is known for
5335 * the corresponding host.
5336 */
5337 getHostnameByMACAddr: function(mac) {
5338 return this.hosts[mac]
5339 ? (this.hosts[mac].name || null)
5340 : null;
5341 },
5342
5343 /**
5344 * Look up the IPv4 address associated with the given MAC address.
5345 *
5346 * @param {string} mac
5347 * The MAC address to look up.
5348 *
5349 * @returns {null|string}
5350 * Returns the IPv4 address associated with the given MAC or `null` if
5351 * no matching host could be found or if no IPv4 address is known for
5352 * the corresponding host.
5353 */
5354 getIPAddrByMACAddr: function(mac) {
5355 return this.hosts[mac]
5356 ? (L.toArray(this.hosts[mac].ipaddrs || this.hosts[mac].ipv4)[0] || null)
5357 : null;
5358 },
5359
5360 /**
5361 * Look up the IPv6 address associated with the given MAC address.
5362 *
5363 * @param {string} mac
5364 * The MAC address to look up.
5365 *
5366 * @returns {null|string}
5367 * Returns the IPv6 address associated with the given MAC or `null` if
5368 * no matching host could be found or if no IPv6 address is known for
5369 * the corresponding host.
5370 */
5371 getIP6AddrByMACAddr: function(mac) {
5372 return this.hosts[mac]
5373 ? (L.toArray(this.hosts[mac].ip6addrs || this.hosts[mac].ipv6)[0] || null)
5374 : null;
5375 },
5376
5377 /**
5378 * Look up the hostname associated with the given IPv4 address.
5379 *
5380 * @param {string} ipaddr
5381 * The IPv4 address to look up.
5382 *
5383 * @returns {null|string}
5384 * Returns the hostname associated with the given IPv4 or `null` if
5385 * no matching host could be found or if no hostname is known for
5386 * the corresponding host.
5387 */
5388 getHostnameByIPAddr: function(ipaddr) {
5389 for (var mac in this.hosts) {
5390 if (this.hosts[mac].name == null)
5391 continue;
5392
5393 var addrs = L.toArray(this.hosts[mac].ipaddrs || this.hosts[mac].ipv4);
5394
5395 for (var i = 0; i &lt; addrs.length; i++)
5396 if (addrs[i] == ipaddr)
5397 return this.hosts[mac].name;
5398 }
5399
5400 return null;
5401 },
5402
5403 /**
5404 * Look up the MAC address associated with the given IPv4 address.
5405 *
5406 * @param {string} ipaddr
5407 * The IPv4 address to look up.
5408 *
5409 * @returns {null|string}
5410 * Returns the MAC address associated with the given IPv4 or `null` if
5411 * no matching host could be found or if no MAC address is known for
5412 * the corresponding host.
5413 */
5414 getMACAddrByIPAddr: function(ipaddr) {
5415 for (var mac in this.hosts) {
5416 var addrs = L.toArray(this.hosts[mac].ipaddrs || this.hosts[mac].ipv4);
5417
5418 for (var i = 0; i &lt; addrs.length; i++)
5419 if (addrs[i] == ipaddr)
5420 return mac;
5421 }
5422
5423 return null;
5424 },
5425
5426 /**
5427 * Look up the hostname associated with the given IPv6 address.
5428 *
5429 * @param {string} ip6addr
5430 * The IPv6 address to look up.
5431 *
5432 * @returns {null|string}
5433 * Returns the hostname associated with the given IPv6 or `null` if
5434 * no matching host could be found or if no hostname is known for
5435 * the corresponding host.
5436 */
5437 getHostnameByIP6Addr: function(ip6addr) {
5438 for (var mac in this.hosts) {
5439 if (this.hosts[mac].name == null)
5440 continue;
5441
5442 var addrs = L.toArray(this.hosts[mac].ip6addrs || this.hosts[mac].ipv6);
5443
5444 for (var i = 0; i &lt; addrs.length; i++)
5445 if (addrs[i] == ip6addr)
5446 return this.hosts[mac].name;
5447 }
5448
5449 return null;
5450 },
5451
5452 /**
5453 * Look up the MAC address associated with the given IPv6 address.
5454 *
5455 * @param {string} ip6addr
5456 * The IPv6 address to look up.
5457 *
5458 * @returns {null|string}
5459 * Returns the MAC address associated with the given IPv6 or `null` if
5460 * no matching host could be found or if no MAC address is known for
5461 * the corresponding host.
5462 */
5463 getMACAddrByIP6Addr: function(ip6addr) {
5464 for (var mac in this.hosts) {
5465 var addrs = L.toArray(this.hosts[mac].ip6addrs || this.hosts[mac].ipv6);
5466
5467 for (var i = 0; i &lt; addrs.length; i++)
5468 if (addrs[i] == ip6addr)
5469 return mac;
5470 }
5471
5472 return null;
5473 },
5474
5475 /**
5476 * Return an array of (MAC address, name hint) tuples sorted by
5477 * MAC address.
5478 *
5479 * @param {boolean} [preferIp6=false]
5480 * Whether to prefer IPv6 addresses (`true`) or IPv4 addresses (`false`)
5481 * as name hint when no hostname is known for a specific MAC address.
5482 *
5483 * @returns {Array&lt;Array&lt;string>>}
5484 * Returns an array of arrays containing a name hint for each found
5485 * MAC address on the system. The array is sorted ascending by MAC.
5486 *
5487 * Each item of the resulting array is a two element array with the
5488 * MAC being the first element and the name hint being the second
5489 * element. The name hint is either the hostname, an IPv4 or an IPv6
5490 * address related to the MAC address.
5491 *
5492 * If no hostname but both IPv4 and IPv6 addresses are known, the
5493 * `preferIP6` flag specifies whether the IPv6 or the IPv4 address
5494 * is used as hint.
5495 */
5496 getMACHints: function(preferIp6) {
5497 var rv = [];
5498
5499 for (var mac in this.hosts) {
5500 var hint = this.hosts[mac].name ||
5501 L.toArray(this.hosts[mac][preferIp6 ? 'ip6addrs' : 'ipaddrs'] || this.hosts[mac][preferIp6 ? 'ipv6' : 'ipv4'])[0] ||
5502 L.toArray(this.hosts[mac][preferIp6 ? 'ipaddrs' : 'ip6addrs'] || this.hosts[mac][preferIp6 ? 'ipv4' : 'ipv6'])[0];
5503
5504 rv.push([mac, hint]);
5505 }
5506
5507 return rv.sort(function(a, b) {
5508 return L.naturalCompare(a[0], b[0]);
5509 });
5510 }
5511 });
5512
5513 /**
5514 * @class
5515 * @memberof LuCI.network
5516 * @hideconstructor
5517 * @classdesc
5518 *
5519 * The `Network.Protocol` class serves as base for protocol specific
5520 * subclasses which describe logical UCI networks defined by `config
5521 * interface` sections in `/etc/config/network`.
5522 */
5523 Protocol = baseclass.extend(/** @lends LuCI.network.Protocol.prototype */ {
5524 __init__: function(name) {
5525 this.sid = name;
5526 },
5527
5528 _get: function(opt) {
5529 var val = uci.get('network', this.sid, opt);
5530
5531 if (Array.isArray(val))
5532 return val.join(' ');
5533
5534 return val || '';
5535 },
5536
5537 _ubus: function(field) {
5538 for (var i = 0; i &lt; _state.ifaces.length; i++) {
5539 if (_state.ifaces[i].interface != this.sid)
5540 continue;
5541
5542 return (field != null ? _state.ifaces[i][field] : _state.ifaces[i]);
5543 }
5544 },
5545
5546 /**
5547 * Read the given UCI option value of this network.
5548 *
5549 * @param {string} opt
5550 * The UCI option name to read.
5551 *
5552 * @returns {null|string|string[]}
5553 * Returns the UCI option value or `null` if the requested option is
5554 * not found.
5555 */
5556 get: function(opt) {
5557 return uci.get('network', this.sid, opt);
5558 },
5559
5560 /**
5561 * Set the given UCI option of this network to the given value.
5562 *
5563 * @param {string} opt
5564 * The name of the UCI option to set.
5565 *
5566 * @param {null|string|string[]} val
5567 * The value to set or `null` to remove the given option from the
5568 * configuration.
5569 */
5570 set: function(opt, val) {
5571 return uci.set('network', this.sid, opt, val);
5572 },
5573
5574 /**
5575 * Get the associated Linux network device of this network.
5576 *
5577 * @returns {null|string}
5578 * Returns the name of the associated network device or `null` if
5579 * it could not be determined.
5580 */
5581 getIfname: function() {
5582 var ifname;
5583
5584 if (this.isFloating())
5585 ifname = this._ubus('l3_device');
5586 else
5587 ifname = this._ubus('device') || this._ubus('l3_device');
5588
5589 if (ifname != null)
5590 return ifname;
5591
5592 var res = getWifiNetidByNetname(this.sid);
5593 return (res != null ? res[0] : null);
5594 },
5595
5596 /**
5597 * Get the name of this network protocol class.
5598 *
5599 * This function will be overwritten by subclasses created by
5600 * {@link LuCI.network#registerProtocol Network.registerProtocol()}.
5601 *
5602 * @abstract
5603 * @returns {string}
5604 * Returns the name of the network protocol implementation, e.g.
5605 * `static` or `dhcp`.
5606 */
5607 getProtocol: function() {
5608 return null;
5609 },
5610
5611 /**
5612 * Return a human readable description for the protocol, such as
5613 * `Static address` or `DHCP client`.
5614 *
5615 * This function should be overwritten by subclasses.
5616 *
5617 * @abstract
5618 * @returns {string}
5619 * Returns the description string.
5620 */
5621 getI18n: function() {
5622 switch (this.getProtocol()) {
5623 case 'none': return _('Unmanaged');
5624 case 'static': return _('Static address');
5625 case 'dhcp': return _('DHCP client');
5626 default: return _('Unknown');
5627 }
5628 },
5629
5630 /**
5631 * Get the type of the underlying interface.
5632 *
5633 * This function actually is a convenience wrapper around
5634 * `proto.get("type")` and is mainly used by other `LuCI.network` code
5635 * to check whether the interface is declared as bridge in UCI.
5636 *
5637 * @returns {null|string}
5638 * Returns the value of the `type` option of the associated logical
5639 * interface or `null` if no `type` option is set.
5640 */
5641 getType: function() {
5642 return this._get('type');
5643 },
5644
5645 /**
5646 * Get the name of the associated logical interface.
5647 *
5648 * @returns {string}
5649 * Returns the logical interface name, such as `lan` or `wan`.
5650 */
5651 getName: function() {
5652 return this.sid;
5653 },
5654
5655 /**
5656 * Get the uptime of the logical interface.
5657 *
5658 * @returns {number}
5659 * Returns the uptime of the associated interface in seconds.
5660 */
5661 getUptime: function() {
5662 return this._ubus('uptime') || 0;
5663 },
5664
5665 /**
5666 * Get the logical interface expiry time in seconds.
5667 *
5668 * For protocols that have a concept of a lease, such as DHCP or
5669 * DHCPv6, this function returns the remaining time in seconds
5670 * until the lease expires.
5671 *
5672 * @returns {number}
5673 * Returns the amount of seconds until the lease expires or `-1`
5674 * if it isn't applicable to the associated protocol.
5675 */
5676 getExpiry: function() {
5677 var u = this._ubus('uptime'),
5678 d = this._ubus('data');
5679
5680 if (typeof(u) == 'number' &amp;&amp; d != null &amp;&amp;
5681 typeof(d) == 'object' &amp;&amp; typeof(d.leasetime) == 'number') {
5682 var r = d.leasetime - (u % d.leasetime);
5683 return (r > 0 ? r : 0);
5684 }
5685
5686 return -1;
5687 },
5688
5689 /**
5690 * Get the metric value of the logical interface.
5691 *
5692 * @returns {number}
5693 * Returns the current metric value used for device and network
5694 * routes spawned by the associated logical interface.
5695 */
5696 getMetric: function() {
5697 return this._ubus('metric') || 0;
5698 },
5699
5700 /**
5701 * Get the requested firewall zone name of the logical interface.
5702 *
5703 * Some protocol implementations request a specific firewall zone
5704 * to trigger inclusion of their resulting network devices into the
5705 * firewall rule set.
5706 *
5707 * @returns {null|string}
5708 * Returns the requested firewall zone name as published in the
5709 * `ubus` runtime information or `null` if the remote protocol
5710 * handler didn't request a zone.
5711 */
5712 getZoneName: function() {
5713 var d = this._ubus('data');
5714
5715 if (L.isObject(d) &amp;&amp; typeof(d.zone) == 'string')
5716 return d.zone;
5717
5718 return null;
5719 },
5720
5721 /**
5722 * Query the first (primary) IPv4 address of the logical interface.
5723 *
5724 * @returns {null|string}
5725 * Returns the primary IPv4 address registered by the protocol handler
5726 * or `null` if no IPv4 addresses were set.
5727 */
5728 getIPAddr: function() {
5729 var addrs = this._ubus('ipv4-address');
5730 return ((Array.isArray(addrs) &amp;&amp; addrs.length) ? addrs[0].address : null);
5731 },
5732
5733 /**
5734 * Query all IPv4 addresses of the logical interface.
5735 *
5736 * @returns {string[]}
5737 * Returns an array of IPv4 addresses in CIDR notation which have been
5738 * registered by the protocol handler. The order of the resulting array
5739 * follows the order of the addresses in `ubus` runtime information.
5740 */
5741 getIPAddrs: function() {
5742 var addrs = this._ubus('ipv4-address'),
5743 rv = [];
5744
5745 if (Array.isArray(addrs))
5746 for (var i = 0; i &lt; addrs.length; i++)
5747 rv.push('%s/%d'.format(addrs[i].address, addrs[i].mask));
5748
5749 return rv;
5750 },
5751
5752 /**
5753 * Query the first (primary) IPv4 netmask of the logical interface.
5754 *
5755 * @returns {null|string}
5756 * Returns the netmask of the primary IPv4 address registered by the
5757 * protocol handler or `null` if no IPv4 addresses were set.
5758 */
5759 getNetmask: function() {
5760 var addrs = this._ubus('ipv4-address');
5761 if (Array.isArray(addrs) &amp;&amp; addrs.length)
5762 return prefixToMask(addrs[0].mask, false);
5763 },
5764
5765 /**
5766 * Query the gateway (nexthop) of the default route associated with
5767 * this logical interface.
5768 *
5769 * @returns {string}
5770 * Returns a string containing the IPv4 nexthop address of the associated
5771 * default route or `null` if no default route was found.
5772 */
5773 getGatewayAddr: function() {
5774 var routes = this._ubus('route');
5775
5776 if (Array.isArray(routes))
5777 for (var i = 0; i &lt; routes.length; i++)
5778 if (typeof(routes[i]) == 'object' &amp;&amp;
5779 routes[i].target == '0.0.0.0' &amp;&amp;
5780 routes[i].mask == 0)
5781 return routes[i].nexthop;
5782
5783 return null;
5784 },
5785
5786 /**
5787 * Query the IPv4 DNS servers associated with the logical interface.
5788 *
5789 * @returns {string[]}
5790 * Returns an array of IPv4 DNS servers registered by the remote
5791 * protocol back-end.
5792 */
5793 getDNSAddrs: function() {
5794 var addrs = this._ubus('dns-server'),
5795 rv = [];
5796
5797 if (Array.isArray(addrs))
5798 for (var i = 0; i &lt; addrs.length; i++)
5799 if (!/:/.test(addrs[i]))
5800 rv.push(addrs[i]);
5801
5802 return rv;
5803 },
5804
5805 /**
5806 * Query the first (primary) IPv6 address of the logical interface.
5807 *
5808 * @returns {null|string}
5809 * Returns the primary IPv6 address registered by the protocol handler
5810 * in CIDR notation or `null` if no IPv6 addresses were set.
5811 */
5812 getIP6Addr: function() {
5813 var addrs = this._ubus('ipv6-address');
5814
5815 if (Array.isArray(addrs) &amp;&amp; L.isObject(addrs[0]))
5816 return '%s/%d'.format(addrs[0].address, addrs[0].mask);
5817
5818 addrs = this._ubus('ipv6-prefix-assignment');
5819
5820 if (Array.isArray(addrs) &amp;&amp; L.isObject(addrs[0]) &amp;&amp; L.isObject(addrs[0]['local-address']))
5821 return '%s/%d'.format(addrs[0]['local-address'].address, addrs[0]['local-address'].mask);
5822
5823 return null;
5824 },
5825
5826 /**
5827 * Query all IPv6 addresses of the logical interface.
5828 *
5829 * @returns {string[]}
5830 * Returns an array of IPv6 addresses in CIDR notation which have been
5831 * registered by the protocol handler. The order of the resulting array
5832 * follows the order of the addresses in `ubus` runtime information.
5833 */
5834 getIP6Addrs: function() {
5835 var addrs = this._ubus('ipv6-address'),
5836 rv = [];
5837
5838 if (Array.isArray(addrs))
5839 for (var i = 0; i &lt; addrs.length; i++)
5840 if (L.isObject(addrs[i]))
5841 rv.push('%s/%d'.format(addrs[i].address, addrs[i].mask));
5842
5843 addrs = this._ubus('ipv6-prefix-assignment');
5844
5845 if (Array.isArray(addrs))
5846 for (var i = 0; i &lt; addrs.length; i++)
5847 if (L.isObject(addrs[i]) &amp;&amp; L.isObject(addrs[i]['local-address']))
5848 rv.push('%s/%d'.format(addrs[i]['local-address'].address, addrs[i]['local-address'].mask));
5849
5850 return rv;
5851 },
5852
5853 /**
5854 * Query the gateway (nexthop) of the IPv6 default route associated with
5855 * this logical interface.
5856 *
5857 * @returns {string}
5858 * Returns a string containing the IPv6 nexthop address of the associated
5859 * default route or `null` if no default route was found.
5860 */
5861 getGateway6Addr: function() {
5862 var routes = this._ubus('route');
5863
5864 if (Array.isArray(routes))
5865 for (var i = 0; i &lt; routes.length; i++)
5866 if (typeof(routes[i]) == 'object' &amp;&amp;
5867 routes[i].target == '::' &amp;&amp;
5868 routes[i].mask == 0)
5869 return routes[i].nexthop;
5870
5871 return null;
5872 },
5873
5874 /**
5875 * Query the IPv6 DNS servers associated with the logical interface.
5876 *
5877 * @returns {string[]}
5878 * Returns an array of IPv6 DNS servers registered by the remote
5879 * protocol back-end.
5880 */
5881 getDNS6Addrs: function() {
5882 var addrs = this._ubus('dns-server'),
5883 rv = [];
5884
5885 if (Array.isArray(addrs))
5886 for (var i = 0; i &lt; addrs.length; i++)
5887 if (/:/.test(addrs[i]))
5888 rv.push(addrs[i]);
5889
5890 return rv;
5891 },
5892
5893 /**
5894 * Query the routed IPv6 prefix associated with the logical interface.
5895 *
5896 * @returns {null|string}
5897 * Returns the routed IPv6 prefix registered by the remote protocol
5898 * handler or `null` if no prefix is present.
5899 */
5900 getIP6Prefix: function() {
5901 var prefixes = this._ubus('ipv6-prefix');
5902
5903 if (Array.isArray(prefixes) &amp;&amp; L.isObject(prefixes[0]))
5904 return '%s/%d'.format(prefixes[0].address, prefixes[0].mask);
5905
5906 return null;
5907 },
5908
5909 /**
5910 * Query interface error messages published in `ubus` runtime state.
5911 *
5912 * Interface errors are emitted by remote protocol handlers if the setup
5913 * of the underlying logical interface failed, e.g. due to bad
5914 * configuration or network connectivity issues.
5915 *
5916 * This function will translate the found error codes to human readable
5917 * messages using the descriptions registered by
5918 * {@link LuCI.network#registerErrorCode Network.registerErrorCode()}
5919 * and fall back to `"Unknown error (%s)"` where `%s` is replaced by the
5920 * error code in case no translation can be found.
5921 *
5922 * @returns {string[]}
5923 * Returns an array of translated interface error messages.
5924 */
5925 getErrors: function() {
5926 var errors = this._ubus('errors'),
5927 rv = null;
5928
5929 if (Array.isArray(errors)) {
5930 for (var i = 0; i &lt; errors.length; i++) {
5931 if (!L.isObject(errors[i]) || typeof(errors[i].code) != 'string')
5932 continue;
5933
5934 rv = rv || [];
5935 rv.push(proto_errors[errors[i].code] || _('Unknown error (%s)').format(errors[i].code));
5936 }
5937 }
5938
5939 return rv;
5940 },
5941
5942 /**
5943 * Checks whether the underlying logical interface is declared as bridge.
5944 *
5945 * @returns {boolean}
5946 * Returns `true` when the interface is declared with `option type bridge`
5947 * and when the associated protocol implementation is not marked virtual
5948 * or `false` when the logical interface is no bridge.
5949 */
5950 isBridge: function() {
5951 return (!this.isVirtual() &amp;&amp; this.getType() == 'bridge');
5952 },
5953
5954 /**
5955 * Get the name of the opkg package providing the protocol functionality.
5956 *
5957 * This function should be overwritten by protocol specific subclasses.
5958 *
5959 * @abstract
5960 *
5961 * @returns {string}
5962 * Returns the name of the opkg package required for the protocol to
5963 * function, e.g. `odhcp6c` for the `dhcpv6` protocol.
5964 */
5965 getOpkgPackage: function() {
5966 return null;
5967 },
5968
5969 /**
5970 * Check function for the protocol handler if a new interface is creatable.
5971 *
5972 * This function should be overwritten by protocol specific subclasses.
5973 *
5974 * @abstract
5975 *
5976 * @param {string} ifname
5977 * The name of the interface to be created.
5978 *
5979 * @returns {Promise&lt;void>}
5980 * Returns a promise resolving if new interface is creatable, else
5981 * rejects with an error message string.
5982 */
5983 isCreateable: function(ifname) {
5984 return Promise.resolve(null);
5985 },
5986
5987 /**
5988 * Checks whether the protocol functionality is installed.
5989 *
5990 * This function exists for compatibility with old code, it always
5991 * returns `true`.
5992 *
5993 * @deprecated
5994 * @abstract
5995 *
5996 * @returns {boolean}
5997 * Returns `true` if the protocol support is installed, else `false`.
5998 */
5999 isInstalled: function() {
6000 return true;
6001 },
6002
6003 /**
6004 * Checks whether this protocol is "virtual".
6005 *
6006 * A "virtual" protocol is a protocol which spawns its own interfaces
6007 * on demand instead of using existing physical interfaces.
6008 *
6009 * Examples for virtual protocols are `6in4` which `gre` spawn tunnel
6010 * network device on startup, examples for non-virtual protocols are
6011 * `dhcp` or `static` which apply IP configuration to existing interfaces.
6012 *
6013 * This function should be overwritten by subclasses.
6014 *
6015 * @returns {boolean}
6016 * Returns a boolean indicating whether the underlying protocol spawns
6017 * dynamic interfaces (`true`) or not (`false`).
6018 */
6019 isVirtual: function() {
6020 return false;
6021 },
6022
6023 /**
6024 * Checks whether this protocol is "floating".
6025 *
6026 * A "floating" protocol is a protocol which spawns its own interfaces
6027 * on demand, like a virtual one but which relies on an existing lower
6028 * level interface to initiate the connection.
6029 *
6030 * An example for such a protocol is "pppoe".
6031 *
6032 * This function exists for backwards compatibility with older code
6033 * but should not be used anymore.
6034 *
6035 * @deprecated
6036 * @returns {boolean}
6037 * Returns a boolean indicating whether this protocol is floating (`true`)
6038 * or not (`false`).
6039 */
6040 isFloating: function() {
6041 return false;
6042 },
6043
6044 /**
6045 * Checks whether this logical interface is dynamic.
6046 *
6047 * A dynamic interface is an interface which has been created at runtime,
6048 * e.g. as sub-interface of another interface, but which is not backed by
6049 * any user configuration. Such dynamic interfaces cannot be edited but
6050 * only brought down or restarted.
6051 *
6052 * @returns {boolean}
6053 * Returns a boolean indicating whether this interface is dynamic (`true`)
6054 * or not (`false`).
6055 */
6056 isDynamic: function() {
6057 return (this._ubus('dynamic') == true);
6058 },
6059
6060 /**
6061 * Checks whether this interface is an alias interface.
6062 *
6063 * Alias interfaces are interfaces layering on top of another interface
6064 * and are denoted by a special `@interfacename` notation in the
6065 * underlying `device` option.
6066 *
6067 * @returns {null|string}
6068 * Returns the name of the parent interface if this logical interface
6069 * is an alias or `null` if it is not an alias interface.
6070 */
6071 isAlias: function() {
6072 var ifnames = L.toArray(uci.get('network', this.sid, 'device')),
6073 parent = null;
6074
6075 for (var i = 0; i &lt; ifnames.length; i++)
6076 if (ifnames[i].charAt(0) == '@')
6077 parent = ifnames[i].substr(1);
6078 else if (parent != null)
6079 parent = null;
6080
6081 return parent;
6082 },
6083
6084 /**
6085 * Checks whether this logical interface is "empty", where empty means that it
6086 * has no network devices attached.
6087 *
6088 * @returns {boolean}
6089 * Returns `true` if this logical interface is empty, else `false`.
6090 */
6091 isEmpty: function() {
6092 if (this.isFloating())
6093 return false;
6094
6095 var empty = true,
6096 device = this._get('device');
6097
6098 if (device != null &amp;&amp; device.match(/\S+/))
6099 empty = false;
6100
6101 if (empty == true &amp;&amp; getWifiNetidBySid(this.sid) != null)
6102 empty = false;
6103
6104 return empty;
6105 },
6106
6107 /**
6108 * Checks whether this logical interface is configured and running.
6109 *
6110 * @returns {boolean}
6111 * Returns `true` when the interface is active or `false` when it is not.
6112 */
6113 isUp: function() {
6114 return (this._ubus('up') == true);
6115 },
6116
6117 /**
6118 * Add the given network device to the logical interface.
6119 *
6120 * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} device
6121 * The object or device name to add to the logical interface. In case the
6122 * given argument is not a string, it is resolved though the
6123 * {@link LuCI.network#getIfnameOf Network.getIfnameOf()} function.
6124 *
6125 * @returns {boolean}
6126 * Returns `true` if the device name has been added or `false` if any
6127 * argument was invalid, if the device was already part of the logical
6128 * interface or if the logical interface is virtual.
6129 */
6130 addDevice: function(device) {
6131 device = ifnameOf(device);
6132
6133 if (device == null || this.isFloating())
6134 return false;
6135
6136 var wif = getWifiSidByIfname(device);
6137
6138 if (wif != null)
6139 return appendValue('wireless', wif, 'network', this.sid);
6140
6141 return appendValue('network', this.sid, 'device', device);
6142 },
6143
6144 /**
6145 * Remove the given network device from the logical interface.
6146 *
6147 * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} device
6148 * The object or device name to remove from the logical interface. In case
6149 * the given argument is not a string, it is resolved though the
6150 * {@link LuCI.network#getIfnameOf Network.getIfnameOf()} function.
6151 *
6152 * @returns {boolean}
6153 * Returns `true` if the device name has been added or `false` if any
6154 * argument was invalid, if the device was already part of the logical
6155 * interface or if the logical interface is virtual.
6156 */
6157 deleteDevice: function(device) {
6158 var rv = false;
6159
6160 device = ifnameOf(device);
6161
6162 if (device == null || this.isFloating())
6163 return false;
6164
6165 var wif = getWifiSidByIfname(device);
6166
6167 if (wif != null)
6168 rv = removeValue('wireless', wif, 'network', this.sid);
6169
6170 if (removeValue('network', this.sid, 'device', device))
6171 rv = true;
6172
6173 return rv;
6174 },
6175
6176 /**
6177 * Returns the Linux network device associated with this logical
6178 * interface.
6179 *
6180 * @returns {LuCI.network.Device}
6181 * Returns a `Network.Device` class instance representing the
6182 * expected Linux network device according to the configuration.
6183 */
6184 getDevice: function() {
6185 if (this.isVirtual()) {
6186 var ifname = '%s-%s'.format(this.getProtocol(), this.sid);
6187 _state.isTunnel[this.getProtocol() + '-' + this.sid] = true;
6188 return Network.prototype.instantiateDevice(ifname, this);
6189 }
6190 else if (this.isBridge()) {
6191 var ifname = 'br-%s'.format(this.sid);
6192 _state.isBridge[ifname] = true;
6193 return new Device(ifname, this);
6194 }
6195 else {
6196 var ifnames = L.toArray(uci.get('network', this.sid, 'device'));
6197
6198 for (var i = 0; i &lt; ifnames.length; i++) {
6199 var m = ifnames[i].match(/^([^:/]+)/);
6200 return ((m &amp;&amp; m[1]) ? Network.prototype.instantiateDevice(m[1], this) : null);
6201 }
6202
6203 ifname = getWifiNetidByNetname(this.sid);
6204
6205 return (ifname != null ? Network.prototype.instantiateDevice(ifname[0], this) : null);
6206 }
6207 },
6208
6209 /**
6210 * Returns the layer 2 Linux network device currently associated
6211 * with this logical interface.
6212 *
6213 * @returns {LuCI.network.Device}
6214 * Returns a `Network.Device` class instance representing the Linux
6215 * network device currently associated with the logical interface.
6216 */
6217 getL2Device: function() {
6218 var ifname = this._ubus('device');
6219 return (ifname != null ? Network.prototype.instantiateDevice(ifname, this) : null);
6220 },
6221
6222 /**
6223 * Returns the layer 3 Linux network device currently associated
6224 * with this logical interface.
6225 *
6226 * @returns {LuCI.network.Device}
6227 * Returns a `Network.Device` class instance representing the Linux
6228 * network device currently associated with the logical interface.
6229 */
6230 getL3Device: function() {
6231 var ifname = this._ubus('l3_device');
6232 return (ifname != null ? Network.prototype.instantiateDevice(ifname, this) : null);
6233 },
6234
6235 /**
6236 * Returns a list of network sub-devices associated with this logical
6237 * interface.
6238 *
6239 * @returns {null|Array&lt;LuCI.network.Device>}
6240 * Returns an array of `Network.Device` class instances representing
6241 * the sub-devices attached to this logical interface or `null` if the
6242 * logical interface does not support sub-devices, e.g. because it is
6243 * virtual and not a bridge.
6244 */
6245 getDevices: function() {
6246 var rv = [];
6247
6248 if (!this.isBridge() &amp;&amp; !(this.isVirtual() &amp;&amp; !this.isFloating()))
6249 return null;
6250
6251 var device = uci.get('network', this.sid, 'device');
6252
6253 if (device &amp;&amp; device.charAt(0) != '@') {
6254 var m = device.match(/^([^:/]+)/);
6255 if (m != null)
6256 rv.push(Network.prototype.instantiateDevice(m[1], this));
6257 }
6258
6259 var uciWifiIfaces = uci.sections('wireless', 'wifi-iface');
6260
6261 for (var i = 0; i &lt; uciWifiIfaces.length; i++) {
6262 if (typeof(uciWifiIfaces[i].device) != 'string')
6263 continue;
6264
6265 var networks = L.toArray(uciWifiIfaces[i].network);
6266
6267 for (var j = 0; j &lt; networks.length; j++) {
6268 if (networks[j] != this.sid)
6269 continue;
6270
6271 var netid = getWifiNetidBySid(uciWifiIfaces[i]['.name']);
6272
6273 if (netid != null)
6274 rv.push(Network.prototype.instantiateDevice(netid[0], this));
6275 }
6276 }
6277
6278 rv.sort(deviceSort);
6279
6280 return rv;
6281 },
6282
6283 /**
6284 * Checks whether this logical interface contains the given device
6285 * object.
6286 *
6287 * @param {LuCI.network.Protocol|LuCI.network.Device|LuCI.network.WifiDevice|LuCI.network.WifiNetwork|string} device
6288 * The object or device name to check. In case the given argument is not
6289 * a string, it is resolved though the
6290 * {@link LuCI.network#getIfnameOf Network.getIfnameOf()} function.
6291 *
6292 * @returns {boolean}
6293 * Returns `true` when this logical interface contains the given network
6294 * device or `false` if not.
6295 */
6296 containsDevice: function(device) {
6297 device = ifnameOf(device);
6298
6299 if (device == null)
6300 return false;
6301 else if (this.isVirtual() &amp;&amp; '%s-%s'.format(this.getProtocol(), this.sid) == device)
6302 return true;
6303 else if (this.isBridge() &amp;&amp; 'br-%s'.format(this.sid) == device)
6304 return true;
6305
6306 var name = uci.get('network', this.sid, 'device');
6307 if (name) {
6308 var m = name.match(/^([^:/]+)/);
6309 if (m != null &amp;&amp; m[1] == device)
6310 return true;
6311 }
6312
6313 var wif = getWifiSidByIfname(device);
6314
6315 if (wif != null) {
6316 var networks = L.toArray(uci.get('wireless', wif, 'network'));
6317
6318 for (var i = 0; i &lt; networks.length; i++)
6319 if (networks[i] == this.sid)
6320 return true;
6321 }
6322
6323 return false;
6324 },
6325
6326 /**
6327 * Cleanup related configuration entries.
6328 *
6329 * This function will be invoked if an interface is about to be removed
6330 * from the configuration and is responsible for performing any required
6331 * cleanup tasks, such as unsetting uci entries in related configurations.
6332 *
6333 * It should be overwritten by protocol specific subclasses.
6334 *
6335 * @abstract
6336 *
6337 * @returns {*|Promise&lt;*>}
6338 * This function may return a promise which is awaited before the rest of
6339 * the configuration is removed. Any non-promise return value and any
6340 * resolved promise value is ignored. If the returned promise is rejected,
6341 * the interface removal will be aborted.
6342 */
6343 deleteConfiguration: function() {}
6344 });
6345
6346 /**
6347 * @class
6348 * @memberof LuCI.network
6349 * @hideconstructor
6350 * @classdesc
6351 *
6352 * A `Network.Device` class instance represents an underlying Linux network
6353 * device and allows querying device details such as packet statistics or MTU.
6354 */
6355 Device = baseclass.extend(/** @lends LuCI.network.Device.prototype */ {
6356 __init__: function(device, network) {
6357 var wif = getWifiSidByIfname(device);
6358
6359 if (wif != null) {
6360 var res = getWifiStateBySid(wif) || [],
6361 netid = getWifiNetidBySid(wif) || [];
6362
6363 this.wif = new WifiNetwork(wif, res[0], res[1], netid[0], res[2], { ifname: device });
6364 this.device = this.wif.getIfname();
6365 }
6366
6367 this.device = this.device || device;
6368 this.dev = Object.assign({}, _state.netdevs[this.device]);
6369 this.network = network;
6370
6371 var conf;
6372
6373 uci.sections('network', 'device', function(s) {
6374 if (s.name == device)
6375 conf = s;
6376 });
6377
6378 this.config = Object.assign({}, conf);
6379 },
6380
6381 _devstate: function(/* ... */) {
6382 var rv = this.dev;
6383
6384 for (var i = 0; i &lt; arguments.length; i++)
6385 if (L.isObject(rv))
6386 rv = rv[arguments[i]];
6387 else
6388 return null;
6389
6390 return rv;
6391 },
6392
6393 /**
6394 * Get the name of the network device.
6395 *
6396 * @returns {string}
6397 * Returns the name of the device, e.g. `eth0` or `wlan0`.
6398 */
6399 getName: function() {
6400 return (this.wif != null ? this.wif.getIfname() : this.device);
6401 },
6402
6403 /**
6404 * Get the MAC address of the device.
6405 *
6406 * @returns {null|string}
6407 * Returns the MAC address of the device or `null` if not applicable,
6408 * e.g. for non-Ethernet tunnel devices.
6409 */
6410 getMAC: function() {
6411 var mac = this._devstate('macaddr');
6412 return mac ? mac.toUpperCase() : null;
6413 },
6414
6415 /**
6416 * Get the MTU of the device.
6417 *
6418 * @returns {number}
6419 * Returns the MTU of the device.
6420 */
6421 getMTU: function() {
6422 return this._devstate('mtu');
6423 },
6424
6425 /**
6426 * Get the IPv4 addresses configured on the device.
6427 *
6428 * @returns {string[]}
6429 * Returns an array of IPv4 address strings.
6430 */
6431 getIPAddrs: function() {
6432 var addrs = this._devstate('ipaddrs');
6433 return (Array.isArray(addrs) ? addrs : []);
6434 },
6435
6436 /**
6437 * Get the IPv6 addresses configured on the device.
6438 *
6439 * @returns {string[]}
6440 * Returns an array of IPv6 address strings.
6441 */
6442 getIP6Addrs: function() {
6443 var addrs = this._devstate('ip6addrs');
6444 return (Array.isArray(addrs) ? addrs : []);
6445 },
6446
6447 /**
6448 * Get the type of the device.
6449 *
6450 * @returns {string}
6451 * Returns a string describing the type of the network device:
6452 * - `alias` if it is an abstract alias device (`@` notation)
6453 * - `wifi` if it is a wireless interface (e.g. `wlan0`)
6454 * - `bridge` if it is a bridge device (e.g. `br-lan`)
6455 * - `tunnel` if it is a tun or tap device (e.g. `tun0`)
6456 * - `vlan` if it is a vlan device (e.g. `eth0.1`)
6457 * - `switch` if it is a switch device (e.g.`eth1` connected to switch0)
6458 * - `ethernet` for all other device types
6459 */
6460 getType: function() {
6461 if (this.device != null &amp;&amp; this.device.charAt(0) == '@')
6462 return 'alias';
6463 else if (this.dev.devtype == 'wlan' || this.wif != null || isWifiIfname(this.device))
6464 return 'wifi';
6465 else if (this.dev.devtype == 'bridge' || _state.isBridge[this.device])
6466 return 'bridge';
6467 else if (_state.isTunnel[this.device])
6468 return 'tunnel';
6469 else if (this.dev.devtype == 'vlan' || this.device.indexOf('.') > -1)
6470 return 'vlan';
6471 else if (this.dev.devtype == 'dsa' || _state.isSwitch[this.device])
6472 return 'switch';
6473 else if (this.config.type == '8021q' || this.config.type == '8021ad')
6474 return 'vlan';
6475 else if (this.config.type == 'bridge')
6476 return 'bridge';
6477 else
6478 return 'ethernet';
6479 },
6480
6481 /**
6482 * Get a short description string for the device.
6483 *
6484 * @returns {string}
6485 * Returns the device name for non-WiFi devices or a string containing
6486 * the operation mode and SSID for WiFi devices.
6487 */
6488 getShortName: function() {
6489 if (this.wif != null)
6490 return this.wif.getShortName();
6491
6492 return this.device;
6493 },
6494
6495 /**
6496 * Get a long description string for the device.
6497 *
6498 * @returns {string}
6499 * Returns a string containing the type description and device name
6500 * for non-WiFi devices or operation mode and SSID for WiFi ones.
6501 */
6502 getI18n: function() {
6503 if (this.wif != null) {
6504 return '%s: %s "%s"'.format(
6505 _('Wireless Network'),
6506 this.wif.getActiveMode(),
6507 this.wif.getActiveSSID() || this.wif.getActiveBSSID() || this.wif.getID() || '?');
6508 }
6509
6510 return '%s: "%s"'.format(this.getTypeI18n(), this.getName());
6511 },
6512
6513 /**
6514 * Get a string describing the device type.
6515 *
6516 * @returns {string}
6517 * Returns a string describing the type, e.g. "Wireless Adapter" or
6518 * "Bridge".
6519 */
6520 getTypeI18n: function() {
6521 switch (this.getType()) {
6522 case 'alias':
6523 return _('Alias Interface');
6524
6525 case 'wifi':
6526 return _('Wireless Adapter');
6527
6528 case 'bridge':
6529 return _('Bridge');
6530
6531 case 'switch':
6532 return (_state.netdevs[this.device] &amp;&amp; _state.netdevs[this.device].devtype == 'dsa')
6533 ? _('Switch port') : _('Ethernet Switch');
6534
6535 case 'vlan':
6536 return (_state.isSwitch[this.device] ? _('Switch VLAN') : _('Software VLAN'));
6537
6538 case 'tunnel':
6539 return _('Tunnel Interface');
6540
6541 default:
6542 return _('Ethernet Adapter');
6543 }
6544 },
6545
6546 /**
6547 * Get the associated bridge ports of the device.
6548 *
6549 * @returns {null|Array&lt;LuCI.network.Device>}
6550 * Returns an array of `Network.Device` instances representing the ports
6551 * (slave interfaces) of the bridge or `null` when this device isn't
6552 * a Linux bridge.
6553 */
6554 getPorts: function() {
6555 var br = _state.bridges[this.device],
6556 rv = [];
6557
6558 if (br == null || !Array.isArray(br.ifnames))
6559 return null;
6560
6561 for (var i = 0; i &lt; br.ifnames.length; i++)
6562 rv.push(Network.prototype.instantiateDevice(br.ifnames[i].name));
6563
6564 rv.sort(deviceSort);
6565
6566 return rv;
6567 },
6568
6569 /**
6570 * Get the bridge ID
6571 *
6572 * @returns {null|string}
6573 * Returns the ID of this network bridge or `null` if this network
6574 * device is not a Linux bridge.
6575 */
6576 getBridgeID: function() {
6577 var br = _state.bridges[this.device];
6578 return (br != null ? br.id : null);
6579 },
6580
6581 /**
6582 * Get the bridge STP setting
6583 *
6584 * @returns {boolean}
6585 * Returns `true` when this device is a Linux bridge and has `stp`
6586 * enabled, else `false`.
6587 */
6588 getBridgeSTP: function() {
6589 var br = _state.bridges[this.device];
6590 return (br != null ? !!br.stp : false);
6591 },
6592
6593 /**
6594 * Checks whether this device is up.
6595 *
6596 * @returns {boolean}
6597 * Returns `true` when the associated device is running pr `false`
6598 * when it is down or absent.
6599 */
6600 isUp: function() {
6601 var up = this._devstate('flags', 'up');
6602
6603 if (up == null)
6604 up = (this.getType() == 'alias');
6605
6606 return up;
6607 },
6608
6609 /**
6610 * Checks whether this device is a Linux bridge.
6611 *
6612 * @returns {boolean}
6613 * Returns `true` when the network device is present and a Linux bridge,
6614 * else `false`.
6615 */
6616 isBridge: function() {
6617 return (this.getType() == 'bridge');
6618 },
6619
6620 /**
6621 * Checks whether this device is part of a Linux bridge.
6622 *
6623 * @returns {boolean}
6624 * Returns `true` when this network device is part of a bridge,
6625 * else `false`.
6626 */
6627 isBridgePort: function() {
6628 return (this._devstate('bridge') != null);
6629 },
6630
6631 /**
6632 * Get the amount of transmitted bytes.
6633 *
6634 * @returns {number}
6635 * Returns the amount of bytes transmitted by the network device.
6636 */
6637 getTXBytes: function() {
6638 var stat = this._devstate('stats');
6639 return (stat != null ? stat.tx_bytes || 0 : 0);
6640 },
6641
6642 /**
6643 * Get the amount of received bytes.
6644 *
6645 * @returns {number}
6646 * Returns the amount of bytes received by the network device.
6647 */
6648 getRXBytes: function() {
6649 var stat = this._devstate('stats');
6650 return (stat != null ? stat.rx_bytes || 0 : 0);
6651 },
6652
6653 /**
6654 * Get the amount of transmitted packets.
6655 *
6656 * @returns {number}
6657 * Returns the amount of packets transmitted by the network device.
6658 */
6659 getTXPackets: function() {
6660 var stat = this._devstate('stats');
6661 return (stat != null ? stat.tx_packets || 0 : 0);
6662 },
6663
6664 /**
6665 * Get the amount of received packets.
6666 *
6667 * @returns {number}
6668 * Returns the amount of packets received by the network device.
6669 */
6670 getRXPackets: function() {
6671 var stat = this._devstate('stats');
6672 return (stat != null ? stat.rx_packets || 0 : 0);
6673 },
6674
6675 /**
6676 * Get the carrier state of the network device.
6677 *
6678 * @returns {boolean}
6679 * Returns true if the device has a carrier, e.g. when a cable is
6680 * inserted into an Ethernet port of false if there is none.
6681 */
6682 getCarrier: function() {
6683 var link = this._devstate('link');
6684 return (link != null ? link.carrier || false : false);
6685 },
6686
6687 /**
6688 * Get the current link speed of the network device if available.
6689 *
6690 * @returns {number|null}
6691 * Returns the current speed of the network device in Mbps. If the
6692 * device supports no Ethernet speed levels, null is returned.
6693 * If the device supports Ethernet speeds but has no carrier, -1 is
6694 * returned.
6695 */
6696 getSpeed: function() {
6697 var link = this._devstate('link');
6698 return (link != null ? link.speed || null : null);
6699 },
6700
6701 /**
6702 * Get the current duplex mode of the network device if available.
6703 *
6704 * @returns {string|null}
6705 * Returns the current duplex mode of the network device. Returns
6706 * either "full" or "half" if the device supports duplex modes or
6707 * null if the duplex mode is unknown or unsupported.
6708 */
6709 getDuplex: function() {
6710 var link = this._devstate('link'),
6711 duplex = link ? link.duplex : null;
6712
6713 return (duplex != 'unknown') ? duplex : null;
6714 },
6715
6716 /**
6717 * Get the primary logical interface this device is assigned to.
6718 *
6719 * @returns {null|LuCI.network.Protocol}
6720 * Returns a `Network.Protocol` instance representing the logical
6721 * interface this device is attached to or `null` if it is not
6722 * assigned to any logical interface.
6723 */
6724 getNetwork: function() {
6725 return this.getNetworks()[0];
6726 },
6727
6728 /**
6729 * Get the logical interfaces this device is assigned to.
6730 *
6731 * @returns {Array&lt;LuCI.network.Protocol>}
6732 * Returns an array of `Network.Protocol` instances representing the
6733 * logical interfaces this device is assigned to.
6734 */
6735 getNetworks: function() {
6736 if (this.networks == null) {
6737 this.networks = [];
6738
6739 var networks = enumerateNetworks.apply(L.network);
6740
6741 for (var i = 0; i &lt; networks.length; i++)
6742 if (networks[i].containsDevice(this.device) || networks[i].getIfname() == this.device)
6743 this.networks.push(networks[i]);
6744
6745 this.networks.sort(networkSort);
6746 }
6747
6748 return this.networks;
6749 },
6750
6751 /**
6752 * Get the related wireless network this device is related to.
6753 *
6754 * @returns {null|LuCI.network.WifiNetwork}
6755 * Returns a `Network.WifiNetwork` instance representing the wireless
6756 * network corresponding to this network device or `null` if this device
6757 * is not a wireless device.
6758 */
6759 getWifiNetwork: function() {
6760 return (this.wif != null ? this.wif : null);
6761 },
6762
6763 /**
6764 * Get the logical parent device of this device.
6765 *
6766 * In case of DSA switch ports, the parent device will be the DSA switch
6767 * device itself, for VLAN devices, the parent refers to the base device
6768 * etc.
6769 *
6770 * @returns {null|LuCI.network.Device}
6771 * Returns a `Network.Device` instance representing the parent device or
6772 * `null` when this device has no parent, as it is the case for e.g.
6773 * ordinary ethernet interfaces.
6774 */
6775 getParent: function() {
6776 if (this.dev.parent)
6777 return Network.prototype.instantiateDevice(this.dev.parent);
6778
6779 if ((this.config.type == '8021q' || this.config.type == '802ad') &amp;&amp; typeof(this.config.ifname) == 'string')
6780 return Network.prototype.instantiateDevice(this.config.ifname);
6781
6782 return null;
6783 }
6784 });
6785
6786 /**
6787 * @class
6788 * @memberof LuCI.network
6789 * @hideconstructor
6790 * @classdesc
6791 *
6792 * A `Network.WifiDevice` class instance represents a wireless radio device
6793 * present on the system and provides wireless capability information as
6794 * well as methods for enumerating related wireless networks.
6795 */
6796 WifiDevice = baseclass.extend(/** @lends LuCI.network.WifiDevice.prototype */ {
6797 __init__: function(name, radiostate) {
6798 var uciWifiDevice = uci.get('wireless', name);
6799
6800 if (uciWifiDevice != null &amp;&amp;
6801 uciWifiDevice['.type'] == 'wifi-device' &amp;&amp;
6802 uciWifiDevice['.name'] != null) {
6803 this.sid = uciWifiDevice['.name'];
6804 }
6805
6806 this.sid = this.sid || name;
6807 this._ubusdata = {
6808 radio: name,
6809 dev: radiostate
6810 };
6811 },
6812
6813 /* private */
6814 ubus: function(/* ... */) {
6815 var v = this._ubusdata;
6816
6817 for (var i = 0; i &lt; arguments.length; i++)
6818 if (L.isObject(v))
6819 v = v[arguments[i]];
6820 else
6821 return null;
6822
6823 return v;
6824 },
6825
6826 /**
6827 * Read the given UCI option value of this wireless device.
6828 *
6829 * @param {string} opt
6830 * The UCI option name to read.
6831 *
6832 * @returns {null|string|string[]}
6833 * Returns the UCI option value or `null` if the requested option is
6834 * not found.
6835 */
6836 get: function(opt) {
6837 return uci.get('wireless', this.sid, opt);
6838 },
6839
6840 /**
6841 * Set the given UCI option of this network to the given value.
6842 *
6843 * @param {string} opt
6844 * The name of the UCI option to set.
6845 *
6846 * @param {null|string|string[]} value
6847 * The value to set or `null` to remove the given option from the
6848 * configuration.
6849 */
6850 set: function(opt, value) {
6851 return uci.set('wireless', this.sid, opt, value);
6852 },
6853
6854 /**
6855 * Checks whether this wireless radio is disabled.
6856 *
6857 * @returns {boolean}
6858 * Returns `true` when the wireless radio is marked as disabled in `ubus`
6859 * runtime state or when the `disabled` option is set in the corresponding
6860 * UCI configuration.
6861 */
6862 isDisabled: function() {
6863 return this.ubus('dev', 'disabled') || this.get('disabled') == '1';
6864 },
6865
6866 /**
6867 * Get the configuration name of this wireless radio.
6868 *
6869 * @returns {string}
6870 * Returns the UCI section name (e.g. `radio0`) of the corresponding
6871 * radio configuration which also serves as unique logical identifier
6872 * for the wireless phy.
6873 */
6874 getName: function() {
6875 return this.sid;
6876 },
6877
6878 /**
6879 * Gets a list of supported hwmodes.
6880 *
6881 * The hwmode values describe the frequency band and wireless standard
6882 * versions supported by the wireless phy.
6883 *
6884 * @returns {string[]}
6885 * Returns an array of valid hwmode values for this radio. Currently
6886 * known mode values are:
6887 * - `a` - Legacy 802.11a mode, 5 GHz, up to 54 Mbit/s
6888 * - `b` - Legacy 802.11b mode, 2.4 GHz, up to 11 Mbit/s
6889 * - `g` - Legacy 802.11g mode, 2.4 GHz, up to 54 Mbit/s
6890 * - `n` - IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/s
6891 * - `ac` - IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/s
6892 * - `ax` - IEEE 802.11ax mode, 2.4 or 5 GHz
6893 */
6894 getHWModes: function() {
6895 var hwmodes = this.ubus('dev', 'iwinfo', 'hwmodes');
6896 return Array.isArray(hwmodes) ? hwmodes : [ 'b', 'g' ];
6897 },
6898
6899 /**
6900 * Gets a list of supported htmodes.
6901 *
6902 * The htmode values describe the wide-frequency options supported by
6903 * the wireless phy.
6904 *
6905 * @returns {string[]}
6906 * Returns an array of valid htmode values for this radio. Currently
6907 * known mode values are:
6908 * - `HT20` - applicable to IEEE 802.11n, 20 MHz wide channels
6909 * - `HT40` - applicable to IEEE 802.11n, 40 MHz wide channels
6910 * - `VHT20` - applicable to IEEE 802.11ac, 20 MHz wide channels
6911 * - `VHT40` - applicable to IEEE 802.11ac, 40 MHz wide channels
6912 * - `VHT80` - applicable to IEEE 802.11ac, 80 MHz wide channels
6913 * - `VHT160` - applicable to IEEE 802.11ac, 160 MHz wide channels
6914 * - `HE20` - applicable to IEEE 802.11ax, 20 MHz wide channels
6915 * - `HE40` - applicable to IEEE 802.11ax, 40 MHz wide channels
6916 * - `HE80` - applicable to IEEE 802.11ax, 80 MHz wide channels
6917 * - `HE160` - applicable to IEEE 802.11ax, 160 MHz wide channels
6918 */
6919 getHTModes: function() {
6920 var htmodes = this.ubus('dev', 'iwinfo', 'htmodes');
6921 return (Array.isArray(htmodes) &amp;&amp; htmodes.length) ? htmodes : null;
6922 },
6923
6924 /**
6925 * Get a string describing the wireless radio hardware.
6926 *
6927 * @returns {string}
6928 * Returns the description string.
6929 */
6930 getI18n: function() {
6931 var hw = this.ubus('dev', 'iwinfo', 'hardware'),
6932 type = L.isObject(hw) ? hw.name : null;
6933 var modes = this.ubus('dev', 'iwinfo', 'hwmodes_text');
6934
6935 if (this.ubus('dev', 'iwinfo', 'type') == 'wl')
6936 type = 'Broadcom';
6937
6938 return '%s %s Wireless Controller (%s)'.format(
6939 type || 'Generic',
6940 modes ? '802.11' + modes : 'unknown',
6941 this.getName());
6942 },
6943
6944 /**
6945 * A wireless scan result object describes a neighbouring wireless
6946 * network found in the vicinity.
6947 *
6948 * @typedef {Object&lt;string, number|string|LuCI.network.WifiEncryption>} WifiScanResult
6949 * @memberof LuCI.network
6950 *
6951 * @property {string} ssid
6952 * The SSID / Mesh ID of the network.
6953 *
6954 * @property {string} bssid
6955 * The BSSID if the network.
6956 *
6957 * @property {string} mode
6958 * The operation mode of the network (`Master`, `Ad-Hoc`, `Mesh Point`).
6959 *
6960 * @property {number} channel
6961 * The wireless channel of the network.
6962 *
6963 * @property {number} signal
6964 * The received signal strength of the network in dBm.
6965 *
6966 * @property {number} quality
6967 * The numeric quality level of the signal, can be used in conjunction
6968 * with `quality_max` to calculate a quality percentage.
6969 *
6970 * @property {number} quality_max
6971 * The maximum possible quality level of the signal, can be used in
6972 * conjunction with `quality` to calculate a quality percentage.
6973 *
6974 * @property {LuCI.network.WifiEncryption} encryption
6975 * The encryption used by the wireless network.
6976 */
6977
6978 /**
6979 * Trigger a wireless scan on this radio device and obtain a list of
6980 * nearby networks.
6981 *
6982 * @returns {Promise&lt;Array&lt;LuCI.network.WifiScanResult>>}
6983 * Returns a promise resolving to an array of scan result objects
6984 * describing the networks found in the vicinity.
6985 */
6986 getScanList: function() {
6987 return callIwinfoScan(this.sid);
6988 },
6989
6990 /**
6991 * Check whether the wireless radio is marked as up in the `ubus`
6992 * runtime state.
6993 *
6994 * @returns {boolean}
6995 * Returns `true` when the radio device is up, else `false`.
6996 */
6997 isUp: function() {
6998 if (L.isObject(_state.radios[this.sid]))
6999 return (_state.radios[this.sid].up == true);
7000
7001 return false;
7002 },
7003
7004 /**
7005 * Get the wifi network of the given name belonging to this radio device
7006 *
7007 * @param {string} network
7008 * The name of the wireless network to look up. This may be either an uci
7009 * configuration section ID, a network ID in the form `radio#.network#`
7010 * or a Linux network device name like `wlan0` which is resolved to the
7011 * corresponding configuration section through `ubus` runtime information.
7012 *
7013 * @returns {Promise&lt;LuCI.network.WifiNetwork>}
7014 * Returns a promise resolving to a `Network.WifiNetwork` instance
7015 * representing the wireless network and rejecting with `null` if
7016 * the given network could not be found or is not associated with
7017 * this radio device.
7018 */
7019 getWifiNetwork: function(network) {
7020 return Network.prototype.getWifiNetwork(network).then(L.bind(function(networkInstance) {
7021 var uciWifiIface = (networkInstance.sid ? uci.get('wireless', networkInstance.sid) : null);
7022
7023 if (uciWifiIface == null || uciWifiIface['.type'] != 'wifi-iface' || uciWifiIface.device != this.sid)
7024 return Promise.reject();
7025
7026 return networkInstance;
7027 }, this));
7028 },
7029
7030 /**
7031 * Get all wireless networks associated with this wireless radio device.
7032 *
7033 * @returns {Promise&lt;Array&lt;LuCI.network.WifiNetwork>>}
7034 * Returns a promise resolving to an array of `Network.WifiNetwork`
7035 * instances representing the wireless networks associated with this
7036 * radio device.
7037 */
7038 getWifiNetworks: function() {
7039 return Network.prototype.getWifiNetworks().then(L.bind(function(networks) {
7040 var rv = [];
7041
7042 for (var i = 0; i &lt; networks.length; i++)
7043 if (networks[i].getWifiDeviceName() == this.getName())
7044 rv.push(networks[i]);
7045
7046 return rv;
7047 }, this));
7048 },
7049
7050 /**
7051 * Adds a new wireless network associated with this radio device to the
7052 * configuration and sets its options to the provided values.
7053 *
7054 * @param {Object&lt;string, string|string[]>} [options]
7055 * The options to set for the newly added wireless network.
7056 *
7057 * @returns {Promise&lt;null|LuCI.network.WifiNetwork>}
7058 * Returns a promise resolving to a `WifiNetwork` instance describing
7059 * the newly added wireless network or `null` if the given options
7060 * were invalid.
7061 */
7062 addWifiNetwork: function(options) {
7063 if (!L.isObject(options))
7064 options = {};
7065
7066 options.device = this.sid;
7067
7068 return Network.prototype.addWifiNetwork(options);
7069 },
7070
7071 /**
7072 * Deletes the wireless network with the given name associated with this
7073 * radio device.
7074 *
7075 * @param {string} network
7076 * The name of the wireless network to look up. This may be either an uci
7077 * configuration section ID, a network ID in the form `radio#.network#`
7078 * or a Linux network device name like `wlan0` which is resolved to the
7079 * corresponding configuration section through `ubus` runtime information.
7080 *
7081 * @returns {Promise&lt;boolean>}
7082 * Returns a promise resolving to `true` when the wireless network was
7083 * successfully deleted from the configuration or `false` when the given
7084 * network could not be found or if the found network was not associated
7085 * with this wireless radio device.
7086 */
7087 deleteWifiNetwork: function(network) {
7088 var sid = null;
7089
7090 if (network instanceof WifiNetwork) {
7091 sid = network.sid;
7092 }
7093 else {
7094 var uciWifiIface = uci.get('wireless', network);
7095
7096 if (uciWifiIface == null || uciWifiIface['.type'] != 'wifi-iface')
7097 sid = getWifiSidByIfname(network);
7098 }
7099
7100 if (sid == null || uci.get('wireless', sid, 'device') != this.sid)
7101 return Promise.resolve(false);
7102
7103 uci.delete('wireless', network);
7104
7105 return Promise.resolve(true);
7106 }
7107 });
7108
7109 /**
7110 * @class
7111 * @memberof LuCI.network
7112 * @hideconstructor
7113 * @classdesc
7114 *
7115 * A `Network.WifiNetwork` instance represents a wireless network (vif)
7116 * configured on top of a radio device and provides functions for querying
7117 * the runtime state of the network. Most radio devices support multiple
7118 * such networks in parallel.
7119 */
7120 WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ {
7121 __init__: function(sid, radioname, radiostate, netid, netstate, hostapd) {
7122 this.sid = sid;
7123 this.netid = netid;
7124 this._ubusdata = {
7125 hostapd: hostapd,
7126 radio: radioname,
7127 dev: radiostate,
7128 net: netstate
7129 };
7130 },
7131
7132 ubus: function(/* ... */) {
7133 var v = this._ubusdata;
7134
7135 for (var i = 0; i &lt; arguments.length; i++)
7136 if (L.isObject(v))
7137 v = v[arguments[i]];
7138 else
7139 return null;
7140
7141 return v;
7142 },
7143
7144 /**
7145 * Read the given UCI option value of this wireless network.
7146 *
7147 * @param {string} opt
7148 * The UCI option name to read.
7149 *
7150 * @returns {null|string|string[]}
7151 * Returns the UCI option value or `null` if the requested option is
7152 * not found.
7153 */
7154 get: function(opt) {
7155 return uci.get('wireless', this.sid, opt);
7156 },
7157
7158 /**
7159 * Set the given UCI option of this network to the given value.
7160 *
7161 * @param {string} opt
7162 * The name of the UCI option to set.
7163 *
7164 * @param {null|string|string[]} value
7165 * The value to set or `null` to remove the given option from the
7166 * configuration.
7167 */
7168 set: function(opt, value) {
7169 return uci.set('wireless', this.sid, opt, value);
7170 },
7171
7172 /**
7173 * Checks whether this wireless network is disabled.
7174 *
7175 * @returns {boolean}
7176 * Returns `true` when the wireless radio is marked as disabled in `ubus`
7177 * runtime state or when the `disabled` option is set in the corresponding
7178 * UCI configuration.
7179 */
7180 isDisabled: function() {
7181 return this.ubus('dev', 'disabled') || this.get('disabled') == '1';
7182 },
7183
7184 /**
7185 * Get the configured operation mode of the wireless network.
7186 *
7187 * @returns {string}
7188 * Returns the configured operation mode. Possible values are:
7189 * - `ap` - Master (Access Point) mode
7190 * - `sta` - Station (client) mode
7191 * - `adhoc` - Ad-Hoc (IBSS) mode
7192 * - `mesh` - Mesh (IEEE 802.11s) mode
7193 * - `monitor` - Monitor mode
7194 */
7195 getMode: function() {
7196 return this.ubus('net', 'config', 'mode') || this.get('mode') || 'ap';
7197 },
7198
7199 /**
7200 * Get the configured SSID of the wireless network.
7201 *
7202 * @returns {null|string}
7203 * Returns the configured SSID value or `null` when this network is
7204 * in mesh mode.
7205 */
7206 getSSID: function() {
7207 if (this.getMode() == 'mesh')
7208 return null;
7209
7210 return this.ubus('net', 'config', 'ssid') || this.get('ssid');
7211 },
7212
7213 /**
7214 * Get the configured Mesh ID of the wireless network.
7215 *
7216 * @returns {null|string}
7217 * Returns the configured mesh ID value or `null` when this network
7218 * is not in mesh mode.
7219 */
7220 getMeshID: function() {
7221 if (this.getMode() != 'mesh')
7222 return null;
7223
7224 return this.ubus('net', 'config', 'mesh_id') || this.get('mesh_id');
7225 },
7226
7227 /**
7228 * Get the configured BSSID of the wireless network.
7229 *
7230 * @returns {null|string}
7231 * Returns the BSSID value or `null` if none has been specified.
7232 */
7233 getBSSID: function() {
7234 return this.ubus('net', 'config', 'bssid') || this.get('bssid');
7235 },
7236
7237 /**
7238 * Get the names of the logical interfaces this wireless network is
7239 * attached to.
7240 *
7241 * @returns {string[]}
7242 * Returns an array of logical interface names.
7243 */
7244 getNetworkNames: function() {
7245 return L.toArray(this.ubus('net', 'config', 'network') || this.get('network'));
7246 },
7247
7248 /**
7249 * Get the internal network ID of this wireless network.
7250 *
7251 * The network ID is a LuCI specific identifier in the form
7252 * `radio#.network#` to identify wireless networks by their corresponding
7253 * radio and network index numbers.
7254 *
7255 * @returns {string}
7256 * Returns the LuCI specific network ID.
7257 */
7258 getID: function() {
7259 return this.netid;
7260 },
7261
7262 /**
7263 * Get the configuration ID of this wireless network.
7264 *
7265 * @returns {string}
7266 * Returns the corresponding UCI section ID of the network.
7267 */
7268 getName: function() {
7269 return this.sid;
7270 },
7271
7272 /**
7273 * Get the Linux network device name.
7274 *
7275 * @returns {null|string}
7276 * Returns the current Linux network device name as resolved from
7277 * `ubus` runtime information or `null` if this network has no
7278 * associated network device, e.g. when not configured or up.
7279 */
7280 getIfname: function() {
7281 var ifname = this.ubus('net', 'ifname') || this.ubus('net', 'iwinfo', 'ifname');
7282
7283 if (ifname == null || ifname.match(/^(wifi|radio)\d/))
7284 ifname = this.netid;
7285
7286 return ifname;
7287 },
7288
7289 /**
7290 * Get the Linux VLAN network device names.
7291 *
7292 * @returns {string[]}
7293 * Returns the current Linux VLAN network device name as resolved
7294 * from `ubus` runtime information or empty array if this network
7295 * has no associated VLAN network devices.
7296 */
7297 getVlanIfnames: function() {
7298 var vlans = L.toArray(this.ubus('net', 'vlans')),
7299 ifnames = [];
7300
7301 for (var i = 0; i &lt; vlans.length; i++)
7302 ifnames.push(vlans[i]['ifname']);
7303
7304 return ifnames;
7305 },
7306
7307 /**
7308 * Get the name of the corresponding WiFi radio device.
7309 *
7310 * @returns {null|string}
7311 * Returns the name of the radio device this network is configured on
7312 * or `null` if it cannot be determined.
7313 */
7314 getWifiDeviceName: function() {
7315 return this.ubus('radio') || this.get('device');
7316 },
7317
7318 /**
7319 * Get the corresponding WiFi radio device.
7320 *
7321 * @returns {null|LuCI.network.WifiDevice}
7322 * Returns a `Network.WifiDevice` instance representing the corresponding
7323 * WiFi radio device or `null` if the related radio device could not be
7324 * found.
7325 */
7326 getWifiDevice: function() {
7327 var radioname = this.getWifiDeviceName();
7328
7329 if (radioname == null)
7330 return Promise.reject();
7331
7332 return Network.prototype.getWifiDevice(radioname);
7333 },
7334
7335 /**
7336 * Check whether the radio network is up.
7337 *
7338 * This function actually queries the up state of the related radio
7339 * device and assumes this network to be up as well when the parent
7340 * radio is up. This is due to the fact that OpenWrt does not control
7341 * virtual interfaces individually but within one common hostapd
7342 * instance.
7343 *
7344 * @returns {boolean}
7345 * Returns `true` when the network is up, else `false`.
7346 */
7347 isUp: function() {
7348 var device = this.getDevice();
7349
7350 if (device == null)
7351 return false;
7352
7353 return device.isUp();
7354 },
7355
7356 /**
7357 * Query the current operation mode from runtime information.
7358 *
7359 * @returns {string}
7360 * Returns the human readable mode name as reported by iwinfo or uci mode.
7361 * Possible returned values are:
7362 * - `Master`
7363 * - `Ad-Hoc`
7364 * - `Client`
7365 * - `Monitor`
7366 * - `Master (VLAN)`
7367 * - `WDS`
7368 * - `Mesh Point`
7369 * - `P2P Client`
7370 * - `P2P Go`
7371 * - `Unknown`
7372 */
7373 getActiveMode: function() {
7374 var mode = this.ubus('net', 'iwinfo', 'mode') || this.getMode();
7375
7376 switch (mode) {
7377 case 'ap': return 'Master';
7378 case 'sta': return 'Client';
7379 case 'adhoc': return 'Ad-Hoc';
7380 case 'mesh': return 'Mesh Point';
7381 case 'monitor': return 'Monitor';
7382 default: return mode;
7383 }
7384 },
7385
7386 /**
7387 * Query the current operation mode from runtime information as
7388 * translated string.
7389 *
7390 * @returns {string}
7391 * Returns the translated, human readable mode name as reported by
7392 *`ubus` runtime state.
7393 */
7394 getActiveModeI18n: function() {
7395 var mode = this.getActiveMode();
7396
7397 switch (mode) {
7398 case 'Master': return _('Access Point');
7399 case 'Ad-Hoc': return _('Ad-Hoc');
7400 case 'Client': return _('Client');
7401 case 'Monitor': return _('Monitor');
7402 case 'Master(VLAN)': return _('Master (VLAN)');
7403 case 'WDS': return _('WDS');
7404 case 'Mesh Point': return _('Mesh Point');
7405 case 'P2P Client': return _('P2P Client');
7406 case 'P2P Go': return _('P2P Go');
7407 case 'Unknown': return _('Unknown');
7408 default: return mode;
7409 }
7410 },
7411
7412 /**
7413 * Query the current SSID from runtime information.
7414 *
7415 * @returns {string}
7416 * Returns the current SSID or Mesh ID as reported by `ubus` runtime
7417 * information.
7418 */
7419 getActiveSSID: function() {
7420 return this.ubus('net', 'iwinfo', 'ssid') || this.ubus('net', 'config', 'ssid') || this.get('ssid');
7421 },
7422
7423 /**
7424 * Query the current BSSID from runtime information.
7425 *
7426 * @returns {string}
7427 * Returns the current BSSID or Mesh ID as reported by `ubus` runtime
7428 * information.
7429 */
7430 getActiveBSSID: function() {
7431 return this.ubus('net', 'iwinfo', 'bssid') || this.ubus('net', 'config', 'bssid') || this.get('bssid');
7432 },
7433
7434 /**
7435 * Query the current encryption settings from runtime information.
7436 *
7437 * @returns {string}
7438 * Returns a string describing the current encryption or `-` if the
7439 * encryption state could not be found in `ubus` runtime information.
7440 */
7441 getActiveEncryption: function() {
7442 return formatWifiEncryption(this.ubus('net', 'iwinfo', 'encryption')) || '-';
7443 },
7444
7445 /**
7446 * A wireless peer entry describes the properties of a remote wireless
7447 * peer associated with a local network.
7448 *
7449 * @typedef {Object&lt;string, boolean|number|string|LuCI.network.WifiRateEntry>} WifiPeerEntry
7450 * @memberof LuCI.network
7451 *
7452 * @property {string} mac
7453 * The MAC address (BSSID).
7454 *
7455 * @property {number} signal
7456 * The received signal strength.
7457 *
7458 * @property {number} [signal_avg]
7459 * The average signal strength if supported by the driver.
7460 *
7461 * @property {number} [noise]
7462 * The current noise floor of the radio. May be `0` or absent if not
7463 * supported by the driver.
7464 *
7465 * @property {number} inactive
7466 * The amount of milliseconds the peer has been inactive, e.g. due
7467 * to powersave.
7468 *
7469 * @property {number} connected_time
7470 * The amount of milliseconds the peer is associated to this network.
7471 *
7472 * @property {number} [thr]
7473 * The estimated throughput of the peer, May be `0` or absent if not
7474 * supported by the driver.
7475 *
7476 * @property {boolean} authorized
7477 * Specifies whether the peer is authorized to associate to this network.
7478 *
7479 * @property {boolean} authenticated
7480 * Specifies whether the peer completed authentication to this network.
7481 *
7482 * @property {string} preamble
7483 * The preamble mode used by the peer. May be `long` or `short`.
7484 *
7485 * @property {boolean} wme
7486 * Specifies whether the peer supports WME/WMM capabilities.
7487 *
7488 * @property {boolean} mfp
7489 * Specifies whether management frame protection is active.
7490 *
7491 * @property {boolean} tdls
7492 * Specifies whether TDLS is active.
7493 *
7494 * @property {number} [mesh llid]
7495 * The mesh LLID, may be `0` or absent if not applicable or supported
7496 * by the driver.
7497 *
7498 * @property {number} [mesh plid]
7499 * The mesh PLID, may be `0` or absent if not applicable or supported
7500 * by the driver.
7501 *
7502 * @property {string} [mesh plink]
7503 * The mesh peer link state description, may be an empty string (`''`)
7504 * or absent if not applicable or supported by the driver.
7505 *
7506 * The following states are known:
7507 * - `LISTEN`
7508 * - `OPN_SNT`
7509 * - `OPN_RCVD`
7510 * - `CNF_RCVD`
7511 * - `ESTAB`
7512 * - `HOLDING`
7513 * - `BLOCKED`
7514 * - `UNKNOWN`
7515 *
7516 * @property {number} [mesh local PS]
7517 * The local powersafe mode for the peer link, may be an empty
7518 * string (`''`) or absent if not applicable or supported by
7519 * the driver.
7520 *
7521 * The following modes are known:
7522 * - `ACTIVE` (no power save)
7523 * - `LIGHT SLEEP`
7524 * - `DEEP SLEEP`
7525 * - `UNKNOWN`
7526 *
7527 * @property {number} [mesh peer PS]
7528 * The remote powersafe mode for the peer link, may be an empty
7529 * string (`''`) or absent if not applicable or supported by
7530 * the driver.
7531 *
7532 * The following modes are known:
7533 * - `ACTIVE` (no power save)
7534 * - `LIGHT SLEEP`
7535 * - `DEEP SLEEP`
7536 * - `UNKNOWN`
7537 *
7538 * @property {number} [mesh non-peer PS]
7539 * The powersafe mode for all non-peer neighbours, may be an empty
7540 * string (`''`) or absent if not applicable or supported by the driver.
7541 *
7542 * The following modes are known:
7543 * - `ACTIVE` (no power save)
7544 * - `LIGHT SLEEP`
7545 * - `DEEP SLEEP`
7546 * - `UNKNOWN`
7547 *
7548 * @property {LuCI.network.WifiRateEntry} rx
7549 * Describes the receiving wireless rate from the peer.
7550 *
7551 * @property {LuCI.network.WifiRateEntry} tx
7552 * Describes the transmitting wireless rate to the peer.
7553 */
7554
7555 /**
7556 * A wireless rate entry describes the properties of a wireless
7557 * transmission rate to or from a peer.
7558 *
7559 * @typedef {Object&lt;string, boolean|number>} WifiRateEntry
7560 * @memberof LuCI.network
7561 *
7562 * @property {number} [drop_misc]
7563 * The amount of received misc. packages that have been dropped, e.g.
7564 * due to corruption or missing authentication. Only applicable to
7565 * receiving rates.
7566 *
7567 * @property {number} packets
7568 * The amount of packets that have been received or sent.
7569 *
7570 * @property {number} bytes
7571 * The amount of bytes that have been received or sent.
7572 *
7573 * @property {number} [failed]
7574 * The amount of failed transmission attempts. Only applicable to
7575 * transmit rates.
7576 *
7577 * @property {number} [retries]
7578 * The amount of retried transmissions. Only applicable to transmit
7579 * rates.
7580 *
7581 * @property {boolean} is_ht
7582 * Specifies whether this rate is an HT (IEEE 802.11n) rate.
7583 *
7584 * @property {boolean} is_vht
7585 * Specifies whether this rate is an VHT (IEEE 802.11ac) rate.
7586 *
7587 * @property {number} mhz
7588 * The channel width in MHz used for the transmission.
7589 *
7590 * @property {number} rate
7591 * The bitrate in bit/s of the transmission.
7592 *
7593 * @property {number} [mcs]
7594 * The MCS index of the used transmission rate. Only applicable to
7595 * HT or VHT rates.
7596 *
7597 * @property {number} [40mhz]
7598 * Specifies whether the transmission rate used 40MHz wide channel.
7599 * Only applicable to HT or VHT rates.
7600 *
7601 * Note: this option exists for backwards compatibility only and its
7602 * use is discouraged. The `mhz` field should be used instead to
7603 * determine the channel width.
7604 *
7605 * @property {boolean} [short_gi]
7606 * Specifies whether a short guard interval is used for the transmission.
7607 * Only applicable to HT or VHT rates.
7608 *
7609 * @property {number} [nss]
7610 * Specifies the number of spatial streams used by the transmission.
7611 * Only applicable to VHT rates.
7612 *
7613 * @property {boolean} [he]
7614 * Specifies whether this rate is an HE (IEEE 802.11ax) rate.
7615 *
7616 * @property {number} [he_gi]
7617 * Specifies whether the guard interval used for the transmission.
7618 * Only applicable to HE rates.
7619 *
7620 * @property {number} [he_dcm]
7621 * Specifies whether dual concurrent modulation is used for the transmission.
7622 * Only applicable to HE rates.
7623 */
7624
7625 /**
7626 * Fetch the list of associated peers.
7627 *
7628 * @returns {Promise&lt;Array&lt;LuCI.network.WifiPeerEntry>>}
7629 * Returns a promise resolving to an array of wireless peers associated
7630 * with this network.
7631 */
7632 getAssocList: function() {
7633 var tasks = [];
7634 var ifnames = [ this.getIfname() ].concat(this.getVlanIfnames());
7635
7636 for (var i = 0; i &lt; ifnames.length; i++)
7637 tasks.push(callIwinfoAssoclist(ifnames[i]));
7638
7639 return Promise.all(tasks).then(function(values) {
7640 return Array.prototype.concat.apply([], values);
7641 });
7642 },
7643
7644 /**
7645 * Query the current operating frequency of the wireless network.
7646 *
7647 * @returns {null|string}
7648 * Returns the current operating frequency of the network from `ubus`
7649 * runtime information in GHz or `null` if the information is not
7650 * available.
7651 */
7652 getFrequency: function() {
7653 var freq = this.ubus('net', 'iwinfo', 'frequency');
7654
7655 if (freq != null &amp;&amp; freq > 0)
7656 return '%.03f'.format(freq / 1000);
7657
7658 return null;
7659 },
7660
7661 /**
7662 * Query the current average bit-rate of all peers associated to this
7663 * wireless network.
7664 *
7665 * @returns {null|number}
7666 * Returns the average bit rate among all peers associated to the network
7667 * as reported by `ubus` runtime information or `null` if the information
7668 * is not available.
7669 */
7670 getBitRate: function() {
7671 var rate = this.ubus('net', 'iwinfo', 'bitrate');
7672
7673 if (rate != null &amp;&amp; rate > 0)
7674 return (rate / 1000);
7675
7676 return null;
7677 },
7678
7679 /**
7680 * Query the current wireless channel.
7681 *
7682 * @returns {null|number}
7683 * Returns the wireless channel as reported by `ubus` runtime information
7684 * or `null` if it cannot be determined.
7685 */
7686 getChannel: function() {
7687 return this.ubus('net', 'iwinfo', 'channel') || this.ubus('dev', 'config', 'channel') || this.get('channel');
7688 },
7689
7690 /**
7691 * Query the current wireless signal.
7692 *
7693 * @returns {null|number}
7694 * Returns the wireless signal in dBm as reported by `ubus` runtime
7695 * information or `null` if it cannot be determined.
7696 */
7697 getSignal: function() {
7698 return this.ubus('net', 'iwinfo', 'signal') || 0;
7699 },
7700
7701 /**
7702 * Query the current radio noise floor.
7703 *
7704 * @returns {number}
7705 * Returns the radio noise floor in dBm as reported by `ubus` runtime
7706 * information or `0` if it cannot be determined.
7707 */
7708 getNoise: function() {
7709 return this.ubus('net', 'iwinfo', 'noise') || 0;
7710 },
7711
7712 /**
7713 * Query the current country code.
7714 *
7715 * @returns {string}
7716 * Returns the wireless country code as reported by `ubus` runtime
7717 * information or `00` if it cannot be determined.
7718 */
7719 getCountryCode: function() {
7720 return this.ubus('net', 'iwinfo', 'country') || this.ubus('dev', 'config', 'country') || '00';
7721 },
7722
7723 /**
7724 * Query the current radio TX power.
7725 *
7726 * @returns {null|number}
7727 * Returns the wireless network transmit power in dBm as reported by
7728 * `ubus` runtime information or `null` if it cannot be determined.
7729 */
7730 getTXPower: function() {
7731 return this.ubus('net', 'iwinfo', 'txpower');
7732 },
7733
7734 /**
7735 * Query the radio TX power offset.
7736 *
7737 * Some wireless radios have a fixed power offset, e.g. due to the
7738 * use of external amplifiers.
7739 *
7740 * @returns {number}
7741 * Returns the wireless network transmit power offset in dBm as reported
7742 * by `ubus` runtime information or `0` if there is no offset, or if it
7743 * cannot be determined.
7744 */
7745 getTXPowerOffset: function() {
7746 return this.ubus('net', 'iwinfo', 'txpower_offset') || 0;
7747 },
7748
7749 /**
7750 * Calculate the current signal.
7751 *
7752 * @deprecated
7753 * @returns {number}
7754 * Returns the calculated signal level, which is the difference between
7755 * noise and signal (SNR), divided by 5.
7756 */
7757 getSignalLevel: function(signal, noise) {
7758 if (this.getActiveBSSID() == '00:00:00:00:00:00')
7759 return -1;
7760
7761 signal = signal || this.getSignal();
7762 noise = noise || this.getNoise();
7763
7764 if (signal &lt; 0 &amp;&amp; noise &lt; 0) {
7765 var snr = -1 * (noise - signal);
7766 return Math.floor(snr / 5);
7767 }
7768
7769 return 0;
7770 },
7771
7772 /**
7773 * Calculate the current signal quality percentage.
7774 *
7775 * @returns {number}
7776 * Returns the calculated signal quality in percent. The value is
7777 * calculated from the `quality` and `quality_max` indicators reported
7778 * by `ubus` runtime state.
7779 */
7780 getSignalPercent: function() {
7781 var qc = this.ubus('net', 'iwinfo', 'quality') || 0,
7782 qm = this.ubus('net', 'iwinfo', 'quality_max') || 0;
7783
7784 if (qc > 0 &amp;&amp; qm > 0)
7785 return Math.floor((100 / qm) * qc);
7786
7787 return 0;
7788 },
7789
7790 /**
7791 * Get a short description string for this wireless network.
7792 *
7793 * @returns {string}
7794 * Returns a string describing this network, consisting of the
7795 * active operation mode, followed by either the SSID, BSSID or
7796 * internal network ID, depending on which information is available.
7797 */
7798 getShortName: function() {
7799 return '%s "%s"'.format(
7800 this.getActiveModeI18n(),
7801 this.getActiveSSID() || this.getActiveBSSID() || this.getID());
7802 },
7803
7804 /**
7805 * Get a description string for this wireless network.
7806 *
7807 * @returns {string}
7808 * Returns a string describing this network, consisting of the
7809 * term `Wireless Network`, followed by the active operation mode,
7810 * the SSID, BSSID or internal network ID and the Linux network device
7811 * name, depending on which information is available.
7812 */
7813 getI18n: function() {
7814 return '%s: %s "%s" (%s)'.format(
7815 _('Wireless Network'),
7816 this.getActiveModeI18n(),
7817 this.getActiveSSID() || this.getActiveBSSID() || this.getID(),
7818 this.getIfname());
7819 },
7820
7821 /**
7822 * Get the primary logical interface this wireless network is attached to.
7823 *
7824 * @returns {null|LuCI.network.Protocol}
7825 * Returns a `Network.Protocol` instance representing the logical
7826 * interface or `null` if this network is not attached to any logical
7827 * interface.
7828 */
7829 getNetwork: function() {
7830 return this.getNetworks()[0];
7831 },
7832
7833 /**
7834 * Get the logical interfaces this wireless network is attached to.
7835 *
7836 * @returns {Array&lt;LuCI.network.Protocol>}
7837 * Returns an array of `Network.Protocol` instances representing the
7838 * logical interfaces this wireless network is attached to.
7839 */
7840 getNetworks: function() {
7841 var networkNames = this.getNetworkNames(),
7842 networks = [];
7843
7844 for (var i = 0; i &lt; networkNames.length; i++) {
7845 var uciInterface = uci.get('network', networkNames[i]);
7846
7847 if (uciInterface == null || uciInterface['.type'] != 'interface')
7848 continue;
7849
7850 networks.push(Network.prototype.instantiateNetwork(networkNames[i]));
7851 }
7852
7853 networks.sort(networkSort);
7854
7855 return networks;
7856 },
7857
7858 /**
7859 * Get the associated Linux network device.
7860 *
7861 * @returns {LuCI.network.Device}
7862 * Returns a `Network.Device` instance representing the Linux network
7863 * device associated with this wireless network.
7864 */
7865 getDevice: function() {
7866 return Network.prototype.instantiateDevice(this.getIfname());
7867 },
7868
7869 /**
7870 * Check whether this WiFi network supports de-authenticating clients.
7871 *
7872 * @returns {boolean}
7873 * Returns `true` when this WiFi network instance supports forcibly
7874 * de-authenticating clients, otherwise `false`.
7875 */
7876 isClientDisconnectSupported: function() {
7877 return L.isObject(this.ubus('hostapd', 'del_client'));
7878 },
7879
7880 /**
7881 * Forcibly disconnect the given client from the wireless network.
7882 *
7883 * @param {string} mac
7884 * The MAC address of the client to disconnect.
7885 *
7886 * @param {boolean} [deauth=false]
7887 * Specifies whether to de-authenticate (`true`) or disassociate (`false`)
7888 * the client.
7889 *
7890 * @param {number} [reason=1]
7891 * Specifies the IEEE 802.11 reason code to disassoc/deauth the client
7892 * with. Default is `1` which corresponds to `Unspecified reason`.
7893 *
7894 * @param {number} [ban_time=0]
7895 * Specifies the amount of milliseconds to ban the client from
7896 * reconnecting. By default, no ban time is set which allows the client
7897 * to re-associate / reauthenticate immediately.
7898 *
7899 * @returns {Promise&lt;number>}
7900 * Returns a promise resolving to the underlying ubus call result code
7901 * which is typically `0`, even for not existing MAC addresses.
7902 * The promise might reject with an error in case invalid arguments
7903 * are passed.
7904 */
7905 disconnectClient: function(mac, deauth, reason, ban_time) {
7906 if (reason == null || reason == 0)
7907 reason = 1;
7908
7909 if (ban_time == 0)
7910 ban_time = null;
7911
7912 return rpc.declare({
7913 object: 'hostapd.%s'.format(this.getIfname()),
7914 method: 'del_client',
7915 params: [ 'addr', 'deauth', 'reason', 'ban_time' ]
7916 })(mac, deauth, reason, ban_time);
7917 }
7918 });
7919
7920 return Network;
7921 </code></pre>
7922 </article>
7923 </section>
7924
7925
7926
7927
7928
7929
7930
7931
7932 <footer>
7933 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Thu Dec 28 2023 17:55:36 GMT+0000 (Coordinated Universal Time)
7934 </footer>
7935 </div>
7936 </div>
7937 <script>prettyPrint();</script>
7938 <script src="scripts/jaguar.js"></script>
7939 </body>
7940 </html>