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