Files
luci/LuCI.network.html
2026-02-19 03:40:27 +00:00

3 lines
86 KiB
HTML

<!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/logo.svg"><link type="text/css" rel="stylesheet" href="extra.css"><title>Class: network</title><!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="fallback-dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><a href="/" class="sidebar-title sidebar-title-anchor">LuCI Documentation</a><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-tutorials"><div>Tutorials</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="tutorial-JsonRpcHowTo.html">Using JSON RPC daemon</a></div><div class="sidebar-section-children"><a href="tutorial-Modules.html">Modules</a></div><div class="sidebar-section-children"><a href="tutorial-ThemesHowTo.html">Making Themes</a></div><div class="sidebar-section-children"><a href="tutorial-i18n.html">Internationalisation - i18n</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="LuCI.module_cbi.html">cbi</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="LuCI.html">LuCI</a></div><div class="sidebar-section-children"><a href="LuCI.baseclass.html">baseclass</a></div><div class="sidebar-section-children"><a href="LuCI.dom.html">dom</a></div><div class="sidebar-section-children"><a href="LuCI.form.html">form</a></div><div class="sidebar-section-children"><a href="LuCI.form.AbstractElement.html">AbstractElement</a></div><div class="sidebar-section-children"><a href="LuCI.form.AbstractSection.html">AbstractSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.AbstractValue.html">AbstractValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.Button.html">Button</a></div><div class="sidebar-section-children"><a href="LuCI.form.DirectoryPicker.html">DirectoryPicker</a></div><div class="sidebar-section-children"><a href="LuCI.form.DummyValue.html">DummyValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.DynamicList.html">DynamicList</a></div><div class="sidebar-section-children"><a href="LuCI.form.FileUpload.html">FileUpload</a></div><div class="sidebar-section-children"><a href="LuCI.form.Flag.html">Flag</a></div><div class="sidebar-section-children"><a href="LuCI.form.GridSection.html">GridSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.HiddenValue.html">HiddenValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.JSONMap.html">JSONMap</a></div><div class="sidebar-section-children"><a href="LuCI.form.ListValue.html">ListValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.Map.html">Map</a></div><div class="sidebar-section-children"><a href="LuCI.form.MultiValue.html">MultiValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.NamedSection.html">NamedSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.RangeSliderValue.html">RangeSliderValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.RichListValue.html">RichListValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.SectionValue.html">SectionValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.TableSection.html">TableSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.TextValue.html">TextValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.TypedSection.html">TypedSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.Value.html">Value</a></div><div class="sidebar-section-children"><a href="LuCI.fs.html">fs</a></div><div class="sidebar-section-children"><a href="LuCI.headers.html">headers</a></div><div class="sidebar-section-children"><a href="LuCI.network.html">network</a></div><div class="sidebar-section-children"><a href="LuCI.network.Device.html">Device</a></div><div class="sidebar-section-children"><a href="LuCI.network.Hosts.html">Hosts</a></div><div class="sidebar-section-children"><a href="LuCI.network.Protocol.html">Protocol</a></div><div class="sidebar-section-children"><a href="LuCI.network.WifiDevice.html">WifiDevice</a></div><div class="sidebar-section-children"><a href="LuCI.network.WifiNetwork.html">WifiNetwork</a></div><div class="sidebar-section-children"><a href="LuCI.network.WifiVlan.html">WifiVlan</a></div><div class="sidebar-section-children"><a href="LuCI.poll.html">poll</a></div><div class="sidebar-section-children"><a href="LuCI.request.html">request</a></div><div class="sidebar-section-children"><a href="LuCI.request.poll.html">poll</a></div><div class="sidebar-section-children"><a href="LuCI.response.html">response</a></div><div class="sidebar-section-children"><a href="LuCI.rpc.html">rpc</a></div><div class="sidebar-section-children"><a href="LuCI.session.html">session</a></div><div class="sidebar-section-children"><a href="LuCI.uci.html">uci</a></div><div class="sidebar-section-children"><a href="LuCI.ui.html">ui</a></div><div class="sidebar-section-children"><a href="LuCI.ui.AbstractElement.html">AbstractElement</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Checkbox.html">Checkbox</a></div><div class="sidebar-section-children"><a href="LuCI.ui.ComboButton.html">ComboButton</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Combobox.html">Combobox</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Dropdown.html">Dropdown</a></div><div class="sidebar-section-children"><a href="LuCI.ui.DynamicList.html">DynamicList</a></div><div class="sidebar-section-children"><a href="LuCI.ui.FileUpload.html">FileUpload</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Hiddenfield.html">Hiddenfield</a></div><div class="sidebar-section-children"><a href="LuCI.ui.RangeSlider.html">RangeSlider</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Select.html">Select</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Textarea.html">Textarea</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Textfield.html">Textfield</a></div><div class="sidebar-section-children"><a href="LuCI.ui.changes.html">changes</a></div><div class="sidebar-section-children"><a href="LuCI.ui.menu.html">menu</a></div><div class="sidebar-section-children"><a href="LuCI.ui.tabs.html">tabs</a></div><div class="sidebar-section-children"><a href="LuCI.validation.html">validation</a></div><div class="sidebar-section-children"><a href="LuCI.validation.Validator.html">Validator</a></div><div class="sidebar-section-children"><a href="LuCI.validation.ValidatorFactory.html">ValidatorFactory</a></div><div class="sidebar-section-children"><a href="LuCI.view.html">view</a></div><div class="sidebar-section-children"><a href="LuCI.xhr.html">xhr</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-externals"><div>Externals</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="external-String.html">String</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"><div class="github-home navbar-item"><a id="" href="https://github.com/openwrt/luci" target="">GitHub Project Page</a></div></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="network-title" class="has-anchor"><span class="ancestors"><a href="LuCI.html">LuCI</a>.</span> network</h1><div class="class-description"><p>The <code>LuCI.network</code> class combines data from multiple <code>ubus</code> APIs to provide an abstraction of the current network configuration state.</p><p>It provides methods to enumerate interfaces and devices, to query current configuration details and to manipulate settings.</p></div></header><article><div class="container-overview"><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line651">line 651</a></li></ul></dd></div></dl></div><h2 id="classes" class="subsection-title has-anchor">Classes</h2><dl><dt><a href="LuCI.network.Device.html">Device</a></dt><dd></dd><dt><a href="LuCI.network.Hosts.html">Hosts</a></dt><dd></dd><dt><a href="LuCI.network.Protocol.html">Protocol</a></dt><dd></dd><dt><a href="LuCI.network.WifiDevice.html">WifiDevice</a></dt><dd></dd><dt><a href="LuCI.network.WifiNetwork.html">WifiNetwork</a></dt><dd></dd><dt><a href="LuCI.network.WifiVlan.html">WifiVlan</a></dt><dd></dd></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="addNetwork"><span class="type-signature"></span>addNetwork<span class="signature">(name, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;(null|<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>)>}</span></h3><div class="description"><p>Adds a new network of the given name and update it with the given uci option values.</p><p>If a network with the given name already exist but is empty, then this function will update its option, otherwise it will do nothing.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>The name of the network to add. Must be in the format <code>[a-zA-Z0-9_]+</code>.</p></td></tr><tr><td class="name"><code>options</code></td><td class="type"><span class="param-type">Object.&lt;string, (string|Array.&lt;string>)></span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>An object of uci option values to set on the new network or to update in an existing, empty network.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line919">line 919</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to the <code>Protocol</code> subclass instance describing the added network or resolving to <code>null</code> if the name was invalid or if a non-empty network of the given name already existed.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>)></span></dd></dl></div><h3 class="name has-anchor" id="addWifiNetwork"><span class="type-signature"></span>addWifiNetwork<span class="signature">(options)</span><span class="type-signature"> &rarr; {Promise.&lt;(null|<a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>)>}</span></h3><div class="description"><p>Adds a new wireless network to the configuration and sets its options to the provided values.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>options</code></td><td class="type"><span class="param-type">Object.&lt;string, (string|Array.&lt;string>)></span></td><td class="description last"><p>The options to set for the newly added wireless network. This object must at least contain a <code>device</code> property which is set to the radio name the new network belongs to.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1456">line 1456</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to a <code>WifiNetwork</code> instance describing the newly added wireless network or <code>null</code> if the given options were invalid or if the associated radio device could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|<a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>)></span></dd></dl></div><h3 class="name has-anchor" id="deleteNetwork"><span class="type-signature"></span>deleteNetwork<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h3><div class="description"><p>Deletes the given network and its references from the network and firewall configuration.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the network to delete.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line997">line 997</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to either <code>true</code> if the network and references to it were successfully deleted from the configuration or <code>false</code> if the given network could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;boolean></span></dd></dl></div><h3 class="name has-anchor" id="deleteWifiNetwork"><span class="type-signature"></span>deleteWifiNetwork<span class="signature">(netname)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h3><div class="description"><p>Deletes the given wireless network from the configuration.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>netname</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the network to remove. This may be either a network ID in the form <code>radio#.network#</code> or a Linux network device name like <code>wlan0</code> which is resolved to the corresponding configuration section through <code>ubus</code> runtime information.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1494">line 1494</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to <code>true</code> if the wireless network has been successfully deleted from the configuration or <code>false</code> if it could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;boolean></span></dd></dl></div><h3 class="name has-anchor" id="flushCache"><span class="type-signature"></span>flushCache<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h3><div class="description"><p>Flushes the local network state cache and fetches updated information from the remote <code>ubus</code> apis.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line763">line 763</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to the internal network state object.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Object></span></dd></dl></div><h3 class="name has-anchor" id="formatWifiEncryption"><span class="type-signature"></span>formatWifiEncryption<span class="signature">(encryption)</span><span class="type-signature"> &rarr; {null|string}</span></h3><div class="description"><p>Converts a given <a href="LuCI.network.html#.WifiEncryption"><code>encryption entry</code></a> into a human readable string such as <code>mixed WPA/WPA2 PSK (TKIP, CCMP)</code> or <code>WPA3 SAE (CCMP)</code>.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>encryption</code></td><td class="type"><span class="param-type"><a href="LuCI.network.html#.WifiEncryption">LuCI.<wbr>network.<wbr>WifiEncryption</a></span></td><td class="description last"><p>The wireless encryption entry to convert.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line754">line 754</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns the description string for the given encryption entry or <code>null</code> if the given entry was invalid.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">null</span> |<wbr> <span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getDSLModemType"><span class="type-signature"></span>getDSLModemType<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;(null|string)>}</span></h3><div class="description"><p>Queries the internal DSL modem type from board information.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1758">line 1758</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to the type of the internal modem (e.g. <code>vdsl</code>) or to <code>null</code> if no internal modem is present.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|string)></span></dd></dl></div><h3 class="name has-anchor" id="getDevice"><span class="type-signature"></span>getDevice<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;(null|<a href="LuCI.network.Device.html">LuCI.network.Device</a>)>}</span></h3><div class="description"><p>Get a <a href="LuCI.network.Device.html"><code>Device</code></a> instance describing the given network device.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the network device to get, e.g. <code>eth0</code> or <code>br-lan</code>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1138">line 1138</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to the <code>Device</code> instance describing the network device or <code>null</code> if the given device name could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|<a href="LuCI.network.Device.html">LuCI.network.Device</a>)></span></dd></dl></div><h3 class="name has-anchor" id="getDevices"><span class="type-signature"></span>getDevices<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.network.Device.html">LuCI.network.Device</a>>>}</span></h3><div class="description"><p>Get a sorted list of all found network devices.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1161">line 1161</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to a sorted array of <code>Device</code> class instances describing the network devices found on the system.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.network.Device.html">LuCI.network.Device</a>>></span></dd></dl></div><h3 class="name has-anchor" id="getHostHints"><span class="type-signature"></span>getHostHints<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="LuCI.network.Hosts.html">LuCI.network.Hosts</a>>}</span></h3><div class="description"><p>Queries aggregated information about known hosts.</p><p>This function aggregates information from various sources such as DHCP lease databases, ARP and IPv6 neighbour entries, wireless association list etc. and returns a <a href="LuCI.network.Hosts.html"><code>Hosts</code></a> class instance describing the found hosts.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1775">line 1775</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a <code>Hosts</code> instance describing a host known on the system.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;<a href="LuCI.network.Hosts.html">LuCI.network.Hosts</a>></span></dd></dl></div><h3 class="name has-anchor" id="getIfnameOf"><span class="type-signature"></span>getIfnameOf<span class="signature">(obj)</span><span class="type-signature"> &rarr; {null|string}</span></h3><div class="description"><p>Obtains the network device name of the given object.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>obj</code></td><td class="type"><span class="param-type"><a href="LuCI.network.Protocol.html">LuCI.<wbr>network.<wbr>Protocol</a></span> |<wbr> <span class="param-type"><a href="LuCI.network.Device.html">LuCI.<wbr>network.<wbr>Device</a></span> |<wbr> <span class="param-type"><a href="LuCI.network.WifiDevice.html">LuCI.<wbr>network.<wbr>WifiDevice</a></span> |<wbr> <span class="param-type"><a href="LuCI.network.WifiNetwork.html">LuCI.<wbr>network.<wbr>WifiNetwork</a></span> |<wbr> <span class="param-type">string</span></td><td class="description last"><p>The object to get the device name from.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1747">line 1747</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a string containing the device name or <code>null</code> if the given object could not be converted to a name.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">null</span> |<wbr> <span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getNetwork"><span class="type-signature"></span>getNetwork<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;(null|<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>)>}</span></h3><div class="description"><p>Get a <a href="LuCI.network.Protocol.html"><code>Protocol</code></a> instance describing the network with the given name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The logical interface name of the network get, e.g. <code>lan</code> or <code>wan</code>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line956">line 956</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to a <a href="LuCI.network.Protocol.html"><code>Protocol</code></a> subclass instance describing the network or <code>null</code> if the network did not exist.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>)></span></dd></dl></div><h3 class="name has-anchor" id="getNetworks"><span class="type-signature"></span>getNetworks<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>>}</span></h3><div class="description"><p>Gets an array containing all known networks.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line981">line 981</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to a name-sorted array of <a href="LuCI.network.Protocol.html"><code>Protocol</code></a> subclass instances describing all known networks.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>></span></dd></dl></div><h3 class="name has-anchor" id="getProtocol"><span class="type-signature"></span>getProtocol<span class="signature">(protoname, netname<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {null|<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>}</span></h3><div class="description"><p>Instantiates the given <a href="LuCI.network.Protocol.html"><code>Protocol</code></a> back-end, optionally using the given network name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>protoname</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The protocol back-end to use, e.g. <code>static</code> or <code>dhcp</code>.</p></td></tr><tr><td class="name"><code>netname</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="default">__dummy__</td><td class="description last"><p>The network name to use for the instantiated protocol. This should be usually set to one of the interfaces described in /etc/config/network but it is allowed to omit it, e.g. to query protocol capabilities without the need for an existing interface.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line785">line 785</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns the instantiated protocol back-end class or <code>null</code> if the given protocol isn't known.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">null</span> |<wbr> <span class="param-type"><a href="LuCI.network.Protocol.html">LuCI.<wbr>network.<wbr>Protocol</a></span></dd></dl></div><h3 class="name has-anchor" id="getProtocols"><span class="type-signature"></span>getProtocols<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>}</span></h3><div class="description"><p>Obtains instances of all known <a href="LuCI.network.Protocol.html"><code>Protocol</code></a> back-end classes.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line800">line 800</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns an array of protocol class instances.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>></span></dd></dl></div><h3 class="name has-anchor" id="getSwitchTopologies"><span class="type-signature"></span>getSwitchTopologies<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Object.&lt;string, <a href="LuCI.network.html#.SwitchTopology">LuCI.network.SwitchTopology</a>>>}</span></h3><div class="description"><p>Returns the topologies of all swconfig switches found on the system.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1652">line 1652</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to an object containing the topologies of each switch. The object keys correspond to the name of the switches such as <code>switch0</code>, the values are <a href="LuCI.network.html#.SwitchTopology"><code>SwitchTopology</code></a> objects describing the layout.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Object.&lt;string, <a href="LuCI.network.html#.SwitchTopology">LuCI.network.SwitchTopology</a>>></span></dd></dl></div><h3 class="name has-anchor" id="getWAN6Networks"><span class="type-signature"></span>getWAN6Networks<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>>}</span></h3><div class="description"><p>Get IPv6 wan networks.</p><p>This function looks up all networks having a default <code>::/0</code> route and returns them as an array.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1603">line 1603</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to an array of <code>Protocol</code> subclass instances describing the found IPv6 default route interfaces.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>></span></dd></dl></div><h3 class="name has-anchor" id="getWANNetworks"><span class="type-signature"></span>getWANNetworks<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>>}</span></h3><div class="description"><p>Get IPv4 wan networks.</p><p>This function looks up all networks having a default <code>0.0.0.0/0</code> route and returns them as an array.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1578">line 1578</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to an array of <code>Protocol</code> subclass instances describing the found default route interfaces.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>>></span></dd></dl></div><h3 class="name has-anchor" id="getWifiDevice"><span class="type-signature"></span>getWifiDevice<span class="signature">(devname)</span><span class="type-signature"> &rarr; {Promise.&lt;(null|<a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>)>}</span></h3><div class="description"><p>Get a <a href="LuCI.network.WifiDevice.html"><code>WifiDevice</code></a> instance describing the given wireless radio.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>devname</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The configuration name of the wireless radio to look up, e.g. <code>radio0</code> for the first mac80211 phy on the system.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1363">line 1363</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to the <code>WifiDevice</code> instance describing the underlying radio device or <code>null</code> if the wireless radio could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|<a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>)></span></dd></dl></div><h3 class="name has-anchor" id="getWifiDevices"><span class="type-signature"></span>getWifiDevices<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>>>}</span></h3><div class="description"><p>Obtain a list of all configured radio devices.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1383">line 1383</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to an array of <code>WifiDevice</code> instances describing the wireless radios configured in the system. The order of the array corresponds to the order of the radios in the configuration.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>>></span></dd></dl></div><h3 class="name has-anchor" id="getWifiNetwork"><span class="type-signature"></span>getWifiNetwork<span class="signature">(netname)</span><span class="type-signature"> &rarr; {Promise.&lt;(null|<a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>)>}</span></h3><div class="description"><p>Get a <a href="LuCI.network.WifiNetwork.html"><code>WifiNetwork</code></a> instance describing the given wireless network.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>netname</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the wireless network to look up. This may be either an uci configuration section ID, a network ID in the form <code>radio#.network#</code> or a Linux network device name like <code>wlan0</code> which is resolved to the corresponding configuration section through <code>ubus</code> runtime information.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1412">line 1412</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to the <code>WifiNetwork</code> instance describing the wireless network or <code>null</code> if the corresponding network could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;(null|<a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>)></span></dd></dl></div><h3 class="name has-anchor" id="getWifiNetworks"><span class="type-signature"></span>getWifiNetworks<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>>>}</span></h3><div class="description"><p>Get an array of all <a href="LuCI.network.WifiNetwork.html"><code>WifiNetwork</code></a> instances describing the wireless networks present on the system.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1426">line 1426</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to an array of <code>WifiNetwork</code> instances describing the wireless networks. The array will be empty if no networks are found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>>></span></dd></dl></div><h3 class="name has-anchor" id="isIgnoredDevice"><span class="type-signature"></span>isIgnoredDevice<span class="signature">(name)</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Test if a given network device name is in the list of patterns for device names to ignore.</p><p>Ignored device names are usually Linux network devices which are spawned implicitly by kernel modules such as <code>tunl0</code> or <code>hwsim0</code> and which are unsuitable for use in network configuration.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The device name to test.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1346">line 1346</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns <code>true</code> if the given name is in the ignore-pattern list, else returns <code>false</code>.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="maskToPrefix"><span class="type-signature"></span>maskToPrefix<span class="signature">(netmask, v6<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {null|number}</span></h3><div class="description"><p>Converts the given netmask to a prefix size in bits.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>netmask</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The netmask to convert into a bits count.</p></td></tr><tr><td class="name"><code>v6</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>Whether to parse the given netmask as IPv4 (<code>false</code>) or IPv6 (<code>true</code>) address.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line699">line 699</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns the number of prefix bits contained in the netmask or <code>null</code> if the given netmask value was invalid.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">null</span> |<wbr> <span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="prefixToMask"><span class="type-signature"></span>prefixToMask<span class="signature">(bits, v6<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {null|string}</span></h3><div class="description"><p>Converts the given prefix size in bits to a netmask.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>bits</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The prefix size in bits.</p></td></tr><tr><td class="name"><code>v6</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>Whether to convert the bits value into an IPv4 netmask (<code>false</code>) or an IPv6 netmask (<code>true</code>).</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line681">line 681</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a string containing the netmask corresponding to the bit count or <code>null</code> when the given amount of bits exceeds the maximum possible value of <code>32</code> for IPv4 or <code>128</code> for IPv6.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">null</span> |<wbr> <span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="registerErrorCode"><span class="type-signature"></span>registerErrorCode<span class="signature">(code, message)</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Registers a new human readable translation string for a <code>Protocol</code> error code.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>code</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The <code>ubus</code> protocol error code to register a translation for, e.g. <code>NO_DEVICE</code>.</p></td></tr><tr><td class="name"><code>message</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The message to use as a translation for the given protocol error code.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line888">line 888</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns <code>true</code> if the error code description has been added or <code>false</code> if either the arguments were invalid or if there already was a description for the given code.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="registerPatternVirtual"><span class="type-signature"></span>registerPatternVirtual<span class="signature">(pat)</span></h3><div class="description"><p>Registers a new regular expression pattern to recognize virtual interfaces.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>pat</code></td><td class="type"><span class="param-type">RegExp</span></td><td class="description last"><p>A <code>RegExp</code> instance to match a virtual interface name such as <code>6in4-wan</code> or <code>tun0</code>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line868">line 868</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="registerProtocol"><span class="type-signature"></span>registerProtocol<span class="signature">(protoname, methods)</span><span class="type-signature"> &rarr; {<a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>}</span></h3><div class="description"><p>Registers a new <a href="LuCI.network.Protocol.html"><code>Protocol</code></a> subclass with the given methods and returns the resulting subclass value.</p><p>This function internally calls <a href="LuCI.baseclass.html#.extend"><code>baseclass.extend()</code></a> on the <code>Network.Protocol</code> base class.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>protoname</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the new protocol to register.</p></td></tr><tr><td class="name"><code>methods</code></td><td class="type"><span class="param-type">Object.&lt;string, *></span></td><td class="description last"><p>The member methods and values of the new <code>Protocol</code> subclass to be passed to <a href="LuCI.baseclass.html#.extend"><code>baseclass.extend()</code></a>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line827">line 827</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns the new <code>Protocol</code> subclass.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type"><a href="LuCI.network.Protocol.html">LuCI.<wbr>network.<wbr>Protocol</a></span></dd></dl></div><h3 class="name has-anchor" id="renameNetwork"><span class="type-signature"></span>renameNetwork<span class="signature">(oldName, newName)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h3><div class="description"><p>Rename the given network and its references to a new name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>oldName</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The current name of the network.</p></td></tr><tr><td class="name"><code>newName</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name to rename the network to, must be in the format <code>[a-z-A-Z0-9_]+</code>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1077">line 1077</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>Returns a promise resolving to either <code>true</code> if the network was successfully renamed or <code>false</code> if the new name was invalid, if a network with the new name already exists or if the network to rename could not be found.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Promise.&lt;boolean></span></dd></dl></div><h2 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h2><h3 class="name has-anchor" id=".SwitchTopology">SwitchTopology</h3><div class="description"><p>Describes a swconfig switch topology by specifying the CPU connections and external port labels of a switch.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object.&lt;string, (Object|Array)></span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>netdevs</code></td><td class="type"><span class="param-type">Object.&lt;number, string></span></td><td class="description last"><p>The <code>netdevs</code> property points to an object describing the CPU port connections of the switch. The numeric key of the enclosed object is the port number, the value contains the Linux network device name the port is hardwired to.</p></td></tr><tr><td class="name"><code>ports</code></td><td class="type"><span class="param-type">Array.&lt;Object.&lt;string, (boolean|number|string)>></span></td><td class="description last"><p>The <code>ports</code> property points to an array describing the populated ports of the switch in the external label order. Each array item is an object containing the following keys:</p><ul><li><code>num</code> - the internal switch port number</li><li><code>label</code> - the label of the port, e.g. <code>LAN 1</code> or <code>CPU (eth0)</code></li><li><code>device</code> - the connected Linux network device name (CPU ports only)</li><li><code>tagged</code> - a boolean indicating whether the port must be tagged to function (CPU ports only)</li></ul></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line1618">line 1618</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".WifiEncryption">WifiEncryption</h3><div class="description"><p>An encryption entry describes active wireless encryption settings such as the used key management protocols, active ciphers and protocol versions.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object.&lt;string, (boolean|Array.&lt;(number|string)>)></span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>enabled</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether any kind of encryption, such as <code>WEP</code> or <code>WPA</code> is enabled. If set to <code>false</code>, then no encryption is active and the corresponding network is open.</p></td></tr><tr><td class="name"><code>wep</code></td><td class="type"><span class="param-type">Array.&lt;string></span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>When the <code>wep</code> property exists, the network uses WEP encryption. In this case, the property is set to an array of active WEP modes which might be either <code>open</code>, <code>shared</code> or both.</p></td></tr><tr><td class="name"><code>wpa</code></td><td class="type"><span class="param-type">Array.&lt;number></span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>When the <code>wpa</code> property exists, the network uses WPA security. In this case, the property is set to an array containing the WPA protocol versions used, e.g. <code>[ 1, 2 ]</code> for WPA/WPA2 mixed mode or <code>[ 3 ]</code> for WPA3-SAE.</p></td></tr><tr><td class="name"><code>authentication</code></td><td class="type"><span class="param-type">Array.&lt;string></span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The <code>authentication</code> property only applies to WPA encryption and is defined when the <code>wpa</code> property is set as well. It points to an array of active authentication suites used by the network, e.g. <code>[ &quot;psk&quot; ]</code> for a WPA(2)-PSK network or <code>[ &quot;psk&quot;, &quot;sae&quot; ]</code> for mixed WPA2-PSK/WPA3-SAE encryption.</p></td></tr><tr><td class="name"><code>ciphers</code></td><td class="type"><span class="param-type">Array.&lt;string></span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>If either WEP or WPA encryption is active, then the <code>ciphers</code> property will be set to an array describing the active encryption ciphers used by the network, e.g. <code>[ &quot;tkip&quot;, &quot;ccmp&quot; ]</code> for a WPA/WPA2-PSK mixed network or <code>[ &quot;wep-40&quot;, &quot;wep-104&quot; ]</code> for an WEP network.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line701">line 701</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".WifiPeerEntry">WifiPeerEntry</h3><div class="description"><p>A wireless peer entry describes the properties of a remote wireless peer associated with a local network.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object.&lt;string, (boolean|number|string|<a href="LuCI.network.html#.WifiRateEntry">LuCI.network.WifiRateEntry</a>)></span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>mac</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>The MAC address (BSSID).</p></td></tr><tr><td class="name"><code>signal</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The received signal strength.</p></td></tr><tr><td class="name"><code>signal_avg</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The average signal strength if supported by the driver.</p></td></tr><tr><td class="name"><code>noise</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The current noise floor of the radio. May be <code>0</code> or absent if not supported by the driver.</p></td></tr><tr><td class="name"><code>inactive</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The number of milliseconds the peer has been inactive, e.g. due to power-saving.</p></td></tr><tr><td class="name"><code>connected_time</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The number of milliseconds the peer is associated to this network.</p></td></tr><tr><td class="name"><code>thr</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The estimated throughput of the peer, May be <code>0</code> or absent if not supported by the driver.</p></td></tr><tr><td class="name"><code>authorized</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether the peer is authorized to associate to this network.</p></td></tr><tr><td class="name"><code>authenticated</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether the peer completed authentication to this network.</p></td></tr><tr><td class="name"><code>preamble</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>The preamble mode used by the peer. May be <code>long</code> or <code>short</code>.</p></td></tr><tr><td class="name"><code>wme</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether the peer supports WME/WMM capabilities.</p></td></tr><tr><td class="name"><code>mfp</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether management frame protection is active.</p></td></tr><tr><td class="name"><code>tdls</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether TDLS is active.</p></td></tr><tr><td class="name"><code>mesh_llid</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The mesh LLID, may be <code>0</code> or absent if not applicable or supported by the driver.</p></td></tr><tr><td class="name"><code>mesh_plid</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The mesh PLID, may be <code>0</code> or absent if not applicable or supported by the driver.</p></td></tr><tr><td class="name"><code>mesh_plink</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The mesh peer link state description, may be an empty string (<code>''</code>) or absent if not applicable or supported by the driver.</p><p>The following states are known:</p><ul><li><code>LISTEN</code></li><li><code>OPN_SNT</code></li><li><code>OPN_RCVD</code></li><li><code>CNF_RCVD</code></li><li><code>ESTAB</code></li><li><code>HOLDING</code></li><li><code>BLOCKED</code></li><li><code>UNKNOWN</code></li></ul></td></tr><tr><td class="name"><code>mesh_local_PS</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The local power-save mode for the peer link, may be an empty string (<code>''</code>) or absent if not applicable or supported by the driver.</p><p>The following modes are known:</p><ul><li><code>ACTIVE</code> (no power save)</li><li><code>LIGHT SLEEP</code></li><li><code>DEEP SLEEP</code></li><li><code>UNKNOWN</code></li></ul></td></tr><tr><td class="name"><code>mesh_peer_PS</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The remote power-save mode for the peer link, may be an empty string (<code>''</code>) or absent if not applicable or supported by the driver.</p><p>The following modes are known:</p><ul><li><code>ACTIVE</code> (no power save)</li><li><code>LIGHT SLEEP</code></li><li><code>DEEP SLEEP</code></li><li><code>UNKNOWN</code></li></ul></td></tr><tr><td class="name"><code>mesh_non_peer_PS</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The power-save mode for all non-peer neighbours, may be an empty string (<code>''</code>) or absent if not applicable or supported by the driver.</p><p>The following modes are known:</p><ul><li><code>ACTIVE</code> (no power save)</li><li><code>LIGHT SLEEP</code></li><li><code>DEEP SLEEP</code></li><li><code>UNKNOWN</code></li></ul></td></tr><tr><td class="name"><code>rx</code></td><td class="type"><span class="param-type"><a href="LuCI.network.html#.WifiRateEntry">LuCI.<wbr>network.<wbr>WifiRateEntry</a></span></td><td class="attributes"></td><td class="description last"><p>Describes the receiving wireless rate from the peer.</p></td></tr><tr><td class="name"><code>tx</code></td><td class="type"><span class="param-type"><a href="LuCI.network.html#.WifiRateEntry">LuCI.<wbr>network.<wbr>WifiRateEntry</a></span></td><td class="attributes"></td><td class="description last"><p>Describes the transmitting wireless rate to the peer.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line4026">line 4026</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".WifiRateEntry">WifiRateEntry</h3><div class="description"><p>A wireless rate entry describes the properties of a wireless transmission rate to or from a peer.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object.&lt;string, (boolean|number)></span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>drop_misc</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The amount of received misc. packages that have been dropped, e.g. due to corruption or missing authentication. Only applicable to receiving rates.</p></td></tr><tr><td class="name"><code>packets</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The amount of packets that have been received or sent.</p></td></tr><tr><td class="name"><code>bytes</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The amount of bytes that have been received or sent.</p></td></tr><tr><td class="name"><code>failed</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The amount of failed transmission attempts. Only applicable to transmit rates.</p></td></tr><tr><td class="name"><code>retries</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The amount of retried transmissions. Only applicable to transmit rates.</p></td></tr><tr><td class="name"><code>is_ht</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether this rate is an HT (IEEE 802.11n) rate.</p></td></tr><tr><td class="name"><code>is_vht</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"></td><td class="description last"><p>Specifies whether this rate is an VHT (IEEE 802.11ac) rate.</p></td></tr><tr><td class="name"><code>mhz</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The channel width in MHz used for the transmission.</p></td></tr><tr><td class="name"><code>rate</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"></td><td class="description last"><p>The bitrate in bit/s of the transmission.</p></td></tr><tr><td class="name"><code>mcs</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>The MCS index of the used transmission rate. Only applicable to HT or VHT rates.</p></td></tr><tr><td class="name"><code>40mhz</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether the transmission rate used 40MHz wide channel. Only applicable to HT or VHT rates.</p><p>Note: this option exists for backwards compatibility only, and its use is discouraged. The <code>mhz</code> field should be used instead to determine the channel width.</p></td></tr><tr><td class="name"><code>short_gi</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether a short guard interval is used for the transmission. Only applicable to HT or VHT rates.</p></td></tr><tr><td class="name"><code>nss</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies the number of spatial streams used by the transmission. Only applicable to VHT rates.</p></td></tr><tr><td class="name"><code>he</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether this rate is an HE (IEEE 802.11ax) rate.</p></td></tr><tr><td class="name"><code>he_gi</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether the guard interval used for the transmission. Only applicable to HE rates.</p></td></tr><tr><td class="name"><code>he_dcm</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether dual concurrent modulation is used for the transmission. Only applicable to HE rates.</p></td></tr><tr><td class="name"><code>eht</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether this rate is an EHT (IEEE 802.11be) rate.</p></td></tr><tr><td class="name"><code>eht_gi</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether the guard interval is used for the transmission. Only applicable to EHT rates.</p></td></tr><tr><td class="name"><code>eht_dcm</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes">&lt;optional><br></td><td class="description last"><p>Specifies whether dual concurrent modulation is used for the transmission. Only applicable to EHT rates.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line4136">line 4136</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".WifiScanResult">WifiScanResult</h3><div class="description"><p>A wireless scan result object describes a neighbouring wireless network found in the vicinity.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Object.&lt;string, (number|string|<a href="LuCI.network.html#.WifiEncryption">LuCI.network.WifiEncryption</a>)></span></li></ul></div><b class="subsection-title">Properties</b><div class="allow-overflow"><table class="props"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>ssid</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The SSID / Mesh ID of the network.</p></td></tr><tr><td class="name"><code>bssid</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The BSSID if the network.</p></td></tr><tr><td class="name"><code>mode</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The operation mode of the network (<code>Master</code>, <code>Ad-Hoc</code>, <code>Mesh Point</code>).</p></td></tr><tr><td class="name"><code>channel</code></td><td class="type"><span class="param-type">number</span></td><td class="description last"><p>The wireless channel of the network.</p></td></tr><tr><td class="name"><code>signal</code></td><td class="type"><span class="param-type">number</span></td><td class="description last"><p>The received signal strength of the network in dBm.</p></td></tr><tr><td class="name"><code>quality</code></td><td class="type"><span class="param-type">number</span></td><td class="description last"><p>The numeric quality level of the signal, can be used in conjunction with <code>quality_max</code> to calculate a quality percentage.</p></td></tr><tr><td class="name"><code>quality_max</code></td><td class="type"><span class="param-type">number</span></td><td class="description last"><p>The maximum possible quality level of the signal, can be used in conjunction with <code>quality</code> to calculate a quality percentage.</p></td></tr><tr><td class="name"><code>encryption</code></td><td class="type"><span class="param-type"><a href="LuCI.network.html#.WifiEncryption">LuCI.<wbr>network.<wbr>WifiEncryption</a></span></td><td class="description last"><p>The encryption used by the wireless network.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="network.js.html">network.js</a>, <a href="network.js.html#line3524">line 3524</a></li></ul></dd></div></dl></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><a href="/" class="sidebar-title sidebar-title-anchor">LuCI Documentation</a><div class="mobile-nav-links"><div class="github-home navbar-item"><a id="" href="https://github.com/openwrt/luci" target="">GitHub Project Page</a></div></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-tutorials"><div>Tutorials</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="tutorial-JsonRpcHowTo.html">Using JSON RPC daemon</a></div><div class="sidebar-section-children"><a href="tutorial-Modules.html">Modules</a></div><div class="sidebar-section-children"><a href="tutorial-ThemesHowTo.html">Making Themes</a></div><div class="sidebar-section-children"><a href="tutorial-i18n.html">Internationalisation - i18n</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="LuCI.module_cbi.html">cbi</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="LuCI.html">LuCI</a></div><div class="sidebar-section-children"><a href="LuCI.baseclass.html">baseclass</a></div><div class="sidebar-section-children"><a href="LuCI.dom.html">dom</a></div><div class="sidebar-section-children"><a href="LuCI.form.html">form</a></div><div class="sidebar-section-children"><a href="LuCI.form.AbstractElement.html">AbstractElement</a></div><div class="sidebar-section-children"><a href="LuCI.form.AbstractSection.html">AbstractSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.AbstractValue.html">AbstractValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.Button.html">Button</a></div><div class="sidebar-section-children"><a href="LuCI.form.DirectoryPicker.html">DirectoryPicker</a></div><div class="sidebar-section-children"><a href="LuCI.form.DummyValue.html">DummyValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.DynamicList.html">DynamicList</a></div><div class="sidebar-section-children"><a href="LuCI.form.FileUpload.html">FileUpload</a></div><div class="sidebar-section-children"><a href="LuCI.form.Flag.html">Flag</a></div><div class="sidebar-section-children"><a href="LuCI.form.GridSection.html">GridSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.HiddenValue.html">HiddenValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.JSONMap.html">JSONMap</a></div><div class="sidebar-section-children"><a href="LuCI.form.ListValue.html">ListValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.Map.html">Map</a></div><div class="sidebar-section-children"><a href="LuCI.form.MultiValue.html">MultiValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.NamedSection.html">NamedSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.RangeSliderValue.html">RangeSliderValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.RichListValue.html">RichListValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.SectionValue.html">SectionValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.TableSection.html">TableSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.TextValue.html">TextValue</a></div><div class="sidebar-section-children"><a href="LuCI.form.TypedSection.html">TypedSection</a></div><div class="sidebar-section-children"><a href="LuCI.form.Value.html">Value</a></div><div class="sidebar-section-children"><a href="LuCI.fs.html">fs</a></div><div class="sidebar-section-children"><a href="LuCI.headers.html">headers</a></div><div class="sidebar-section-children"><a href="LuCI.network.html">network</a></div><div class="sidebar-section-children"><a href="LuCI.network.Device.html">Device</a></div><div class="sidebar-section-children"><a href="LuCI.network.Hosts.html">Hosts</a></div><div class="sidebar-section-children"><a href="LuCI.network.Protocol.html">Protocol</a></div><div class="sidebar-section-children"><a href="LuCI.network.WifiDevice.html">WifiDevice</a></div><div class="sidebar-section-children"><a href="LuCI.network.WifiNetwork.html">WifiNetwork</a></div><div class="sidebar-section-children"><a href="LuCI.network.WifiVlan.html">WifiVlan</a></div><div class="sidebar-section-children"><a href="LuCI.poll.html">poll</a></div><div class="sidebar-section-children"><a href="LuCI.request.html">request</a></div><div class="sidebar-section-children"><a href="LuCI.request.poll.html">poll</a></div><div class="sidebar-section-children"><a href="LuCI.response.html">response</a></div><div class="sidebar-section-children"><a href="LuCI.rpc.html">rpc</a></div><div class="sidebar-section-children"><a href="LuCI.session.html">session</a></div><div class="sidebar-section-children"><a href="LuCI.uci.html">uci</a></div><div class="sidebar-section-children"><a href="LuCI.ui.html">ui</a></div><div class="sidebar-section-children"><a href="LuCI.ui.AbstractElement.html">AbstractElement</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Checkbox.html">Checkbox</a></div><div class="sidebar-section-children"><a href="LuCI.ui.ComboButton.html">ComboButton</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Combobox.html">Combobox</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Dropdown.html">Dropdown</a></div><div class="sidebar-section-children"><a href="LuCI.ui.DynamicList.html">DynamicList</a></div><div class="sidebar-section-children"><a href="LuCI.ui.FileUpload.html">FileUpload</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Hiddenfield.html">Hiddenfield</a></div><div class="sidebar-section-children"><a href="LuCI.ui.RangeSlider.html">RangeSlider</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Select.html">Select</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Textarea.html">Textarea</a></div><div class="sidebar-section-children"><a href="LuCI.ui.Textfield.html">Textfield</a></div><div class="sidebar-section-children"><a href="LuCI.ui.changes.html">changes</a></div><div class="sidebar-section-children"><a href="LuCI.ui.menu.html">menu</a></div><div class="sidebar-section-children"><a href="LuCI.ui.tabs.html">tabs</a></div><div class="sidebar-section-children"><a href="LuCI.validation.html">validation</a></div><div class="sidebar-section-children"><a href="LuCI.validation.Validator.html">Validator</a></div><div class="sidebar-section-children"><a href="LuCI.validation.ValidatorFactory.html">ValidatorFactory</a></div><div class="sidebar-section-children"><a href="LuCI.view.html">view</a></div><div class="sidebar-section-children"><a href="LuCI.xhr.html">xhr</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-externals"><div>Externals</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="external-String.html">String</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>