1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <title>Reference</title>
6 <link rel="stylesheet" href="../luadoc.css" type="text/css" />
7 <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
14 <div id="product_logo"></div>
15 <div id="product_name"><big><b></b></big></div>
16 <div id="product_description"></div>
17 </div> <!-- id="product" -->
27 <li><a href="../index.html">Index</a></li>
38 <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
42 <a href="../modules/luci.http.html">luci.http</a>
46 <a href="../modules/luci.http.protocol.html">luci.http.protocol</a>
50 <a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
54 <a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
58 <a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.mime</a>
62 <a href="../modules/luci.i18n.html">luci.i18n</a>
66 <a href="../modules/luci.ip.html">luci.ip</a>
70 <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
74 <a href="../modules/luci.json.html">luci.json</a>
78 <a href="../modules/luci.jsonc.html">luci.jsonc</a>
82 <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
86 <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
90 <a href="../modules/luci.model.uci.html">luci.model.uci</a>
94 <a href="../modules/luci.rpcc.html">luci.rpcc</a>
98 <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
102 <a href="../modules/luci.sys.html">luci.sys</a>
106 <a href="../modules/luci.sys.init.html">luci.sys.init</a>
110 <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
113 <li><strong>luci.sys.net</strong></li>
116 <a href="../modules/luci.sys.process.html">luci.sys.process</a>
120 <a href="../modules/luci.sys.user.html">luci.sys.user</a>
124 <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
128 <a href="../modules/luci.util.html">luci.util</a>
132 <a href="../modules/nixio.html">nixio</a>
136 <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
140 <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
144 <a href="../modules/nixio.File.html">nixio.File</a>
148 <a href="../modules/nixio.README.html">nixio.README</a>
152 <a href="../modules/nixio.Socket.html">nixio.Socket</a>
156 <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
160 <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
164 <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
168 <a href="../modules/nixio.bin.html">nixio.bin</a>
172 <a href="../modules/nixio.bit.html">nixio.bit</a>
176 <a href="../modules/nixio.crypto.html">nixio.crypto</a>
180 <a href="../modules/nixio.fs.html">nixio.fs</a>
195 </div><!-- id="navigation" -->
199 <h1>Class <code>luci.sys.net</code></h1>
203 LuCI system utilities / network related functions.
213 <table class="function_list">
216 <td class="name" nowrap><a href="#net.arptable">arptable</a> ()</td>
219 Returns the current arp-table entries as two-dimensional table.</td>
223 <td class="name" nowrap><a href="#net.conntrack">conntrack</a> ()</td>
226 Returns conntrack information
231 <td class="name" nowrap><a href="#net.deviceinfo">deviceinfo</a> ()</td>
234 Return information about available network interfaces.</td>
238 <td class="name" nowrap><a href="#net.devices">devices</a> ()</td>
241 Determine the names of available network interfaces.</td>
245 <td class="name" nowrap><a href="#net.ipv4_hints">ipv4_hints</a> ()</td>
248 Returns a two-dimensional table of IPv4 address hints.</td>
252 <td class="name" nowrap><a href="#net.ipv6_hints">ipv6_hints</a> ()</td>
255 Returns a two-dimensional table of IPv6 address hints.</td>
259 <td class="name" nowrap><a href="#net.mac_hints">mac_hints</a> ()</td>
262 Returns a two-dimensional table of mac address hints.</td>
266 <td class="name" nowrap><a href="#net.pingtest">pingtest</a> (host)</td>
269 Tests whether the given host responds to ping probes.</td>
273 <td class="name" nowrap><a href="#net.routes">routes</a> ()</td>
276 Returns the current kernel routing table entries.</td>
280 <td class="name" nowrap><a href="#net.routes6">routes6</a> ()</td>
283 Returns the current ipv6 kernel routing table entries.</td>
297 <h2><a name="functions"></a>Functions</h2>
298 <dl class="function">
302 <dt><a name="net.arptable"></a><strong>arptable</strong> ()</dt>
306 Returns the current arp-table entries as two-dimensional table.
315 <h3>Return value:</h3>
316 Table of table containing the current arp entries.
317 The following fields are defined for arp entry objects:
318 { "IP address", "HW address", "HW type", "Flags", "Mask", "Device" }
327 <dt><a name="net.conntrack"></a><strong>conntrack</strong> ()</dt>
331 Returns conntrack information
340 <h3>Return value:</h3>
341 Table with the currently tracked IP connections
350 <dt><a name="net.deviceinfo"></a><strong>deviceinfo</strong> ()</dt>
354 Return information about available network interfaces.
363 <h3>Return value:</h3>
364 Table containing all current interface names and their information
373 <dt><a name="net.devices"></a><strong>devices</strong> ()</dt>
377 Determine the names of available network interfaces.
386 <h3>Return value:</h3>
387 Table containing all current interface names
396 <dt><a name="net.ipv4_hints"></a><strong>ipv4_hints</strong> ()</dt>
400 Returns a two-dimensional table of IPv4 address hints.
409 <h3>Return value:</h3>
410 Table of table containing known hosts from various sources.
411 Each entry contains the values in the following order:
421 <dt><a name="net.ipv6_hints"></a><strong>ipv6_hints</strong> ()</dt>
425 Returns a two-dimensional table of IPv6 address hints.
434 <h3>Return value:</h3>
435 Table of table containing known hosts from various sources.
436 Each entry contains the values in the following order:
446 <dt><a name="net.mac_hints"></a><strong>mac_hints</strong> ()</dt>
450 Returns a two-dimensional table of mac address hints.
459 <h3>Return value:</h3>
460 Table of table containing known hosts from various sources.
461 Each entry contains the values in the following order:
471 <dt><a name="net.pingtest"></a><strong>pingtest</strong> (host)</dt>
475 Tests whether the given host responds to ping probes.
483 host: String containing a hostname or IPv4 address
493 <h3>Return value:</h3>
494 Number containing 0 on success and >= 1 on error
503 <dt><a name="net.routes"></a><strong>routes</strong> ()</dt>
507 Returns the current kernel routing table entries.
516 <h3>Return value:</h3>
517 Table of tables with properties of the corresponding routes.
518 The following fields are defined for route entry tables:
519 { "dest", "gateway", "metric", "refcount", "usecount", "irtt",
529 <dt><a name="net.routes6"></a><strong>routes6</strong> ()</dt>
533 Returns the current ipv6 kernel routing table entries.
542 <h3>Return value:</h3>
543 Table of tables with properties of the corresponding routes.
544 The following fields are defined for route entry tables:
545 { "source", "dest", "nexthop", "metric", "refcount", "usecount",
559 </div> <!-- id="content" -->
561 </div> <!-- id="main" -->
564 <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
565 </div> <!-- id="about" -->
567 </div> <!-- id="container" -->