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.conditionals.html">luci.http.conditionals
</a>
50 <a href=
"../modules/luci.http.date.html">luci.http.date
</a>
54 <a href=
"../modules/luci.http.mime.html">luci.http.mime
</a>
58 <a href=
"../modules/luci.i18n.html">luci.i18n
</a>
62 <a href=
"../modules/luci.ip.html">luci.ip
</a>
66 <a href=
"../modules/luci.ip.cidr.html">luci.ip.cidr
</a>
70 <a href=
"../modules/luci.json.html">luci.json
</a>
74 <a href=
"../modules/luci.jsonc.html">luci.jsonc
</a>
78 <a href=
"../modules/luci.jsonc.parser.html">luci.jsonc.parser
</a>
82 <a href=
"../modules/luci.model.ipkg.html">luci.model.ipkg
</a>
86 <a href=
"../modules/luci.model.uci.html">luci.model.uci
</a>
90 <a href=
"../modules/luci.rpcc.html">luci.rpcc
</a>
94 <a href=
"../modules/luci.rpcc.ruci.html">luci.rpcc.ruci
</a>
98 <a href=
"../modules/luci.sys.html">luci.sys
</a>
102 <a href=
"../modules/luci.sys.init.html">luci.sys.init
</a>
106 <a href=
"../modules/luci.sys.iptparser.html">luci.sys.iptparser
</a>
109 <li><strong>luci.sys.net
</strong></li>
112 <a href=
"../modules/luci.sys.process.html">luci.sys.process
</a>
116 <a href=
"../modules/luci.sys.user.html">luci.sys.user
</a>
120 <a href=
"../modules/luci.sys.wifi.html">luci.sys.wifi
</a>
124 <a href=
"../modules/luci.util.html">luci.util
</a>
128 <a href=
"../modules/nixio.html">nixio
</a>
132 <a href=
"../modules/nixio.CHANGELOG.html">nixio.CHANGELOG
</a>
136 <a href=
"../modules/nixio.CryptoHash.html">nixio.CryptoHash
</a>
140 <a href=
"../modules/nixio.File.html">nixio.File
</a>
144 <a href=
"../modules/nixio.README.html">nixio.README
</a>
148 <a href=
"../modules/nixio.Socket.html">nixio.Socket
</a>
152 <a href=
"../modules/nixio.TLSContext.html">nixio.TLSContext
</a>
156 <a href=
"../modules/nixio.TLSSocket.html">nixio.TLSSocket
</a>
160 <a href=
"../modules/nixio.UnifiedIO.html">nixio.UnifiedIO
</a>
164 <a href=
"../modules/nixio.bin.html">nixio.bin
</a>
168 <a href=
"../modules/nixio.bit.html">nixio.bit
</a>
172 <a href=
"../modules/nixio.crypto.html">nixio.crypto
</a>
176 <a href=
"../modules/nixio.fs.html">nixio.fs
</a>
191 </div><!-- id="navigation" -->
195 <h1>Class
<code>luci.sys.net
</code></h1>
199 LuCI system utilities / network related functions.
209 <table class=
"function_list">
212 <td class=
"name" nowrap
><a href=
"#net.arptable">arptable
</a> ()
</td>
215 Returns the current arp-table entries as two-dimensional table.
</td>
219 <td class=
"name" nowrap
><a href=
"#net.conntrack">conntrack
</a> ()
</td>
222 Returns conntrack information
227 <td class=
"name" nowrap
><a href=
"#net.deviceinfo">deviceinfo
</a> ()
</td>
230 Return information about available network interfaces.
</td>
234 <td class=
"name" nowrap
><a href=
"#net.devices">devices
</a> ()
</td>
237 Determine the names of available network interfaces.
</td>
241 <td class=
"name" nowrap
><a href=
"#net.host_hints">host_hints
</a> ()
</td>
244 Returns a two-dimensional table of host hints.
</td>
248 <td class=
"name" nowrap
><a href=
"#net.ipv4_hints">ipv4_hints
</a> ()
</td>
251 Returns a two-dimensional table of IPv4 address hints.
</td>
255 <td class=
"name" nowrap
><a href=
"#net.ipv6_hints">ipv6_hints
</a> ()
</td>
258 Returns a two-dimensional table of IPv6 address hints.
</td>
262 <td class=
"name" nowrap
><a href=
"#net.mac_hints">mac_hints
</a> ()
</td>
265 Returns a two-dimensional table of mac address hints.
</td>
269 <td class=
"name" nowrap
><a href=
"#net.pingtest">pingtest
</a> (host)
</td>
272 Tests whether the given host responds to ping probes.
</td>
276 <td class=
"name" nowrap
><a href=
"#net.routes">routes
</a> ()
</td>
279 Returns the current kernel routing table entries.
</td>
283 <td class=
"name" nowrap
><a href=
"#net.routes6">routes6
</a> ()
</td>
286 Returns the current ipv6 kernel routing table entries.
</td>
300 <h2><a name=
"functions"></a>Functions
</h2>
301 <dl class=
"function">
305 <dt><a name=
"net.arptable"></a><strong>arptable
</strong> ()
</dt>
309 Returns the current arp-table entries as two-dimensional table.
318 <h3>Return value:
</h3>
319 Table of table containing the current arp entries.
320 The following fields are defined for arp entry objects:
321 {
"IP address",
"HW address",
"HW type",
"Flags",
"Mask",
"Device" }
330 <dt><a name=
"net.conntrack"></a><strong>conntrack
</strong> ()
</dt>
334 Returns conntrack information
343 <h3>Return value:
</h3>
344 Table with the currently tracked IP connections
353 <dt><a name=
"net.deviceinfo"></a><strong>deviceinfo
</strong> ()
</dt>
357 Return information about available network interfaces.
366 <h3>Return value:
</h3>
367 Table containing all current interface names and their information
376 <dt><a name=
"net.devices"></a><strong>devices
</strong> ()
</dt>
380 Determine the names of available network interfaces.
389 <h3>Return value:
</h3>
390 Table containing all current interface names
399 <dt><a name=
"net.host_hints"></a><strong>host_hints
</strong> ()
</dt>
403 Returns a two-dimensional table of host hints.
412 <h3>Return value:
</h3>
413 Table of table containing known hosts from various sources,
414 indexed by mac address. Each subtable contains at least one
415 of the fields
"name",
"ipv4" or
"ipv6".
424 <dt><a name=
"net.ipv4_hints"></a><strong>ipv4_hints
</strong> ()
</dt>
428 Returns a two-dimensional table of IPv4 address hints.
437 <h3>Return value:
</h3>
438 Table of table containing known hosts from various sources.
439 Each entry contains the values in the following order:
449 <dt><a name=
"net.ipv6_hints"></a><strong>ipv6_hints
</strong> ()
</dt>
453 Returns a two-dimensional table of IPv6 address hints.
462 <h3>Return value:
</h3>
463 Table of table containing known hosts from various sources.
464 Each entry contains the values in the following order:
474 <dt><a name=
"net.mac_hints"></a><strong>mac_hints
</strong> ()
</dt>
478 Returns a two-dimensional table of mac address hints.
487 <h3>Return value:
</h3>
488 Table of table containing known hosts from various sources.
489 Each entry contains the values in the following order:
499 <dt><a name=
"net.pingtest"></a><strong>pingtest
</strong> (host)
</dt>
503 Tests whether the given host responds to ping probes.
511 host: String containing a hostname or IPv4 address
521 <h3>Return value:
</h3>
522 Number containing
0 on success and
>=
1 on error
531 <dt><a name=
"net.routes"></a><strong>routes
</strong> ()
</dt>
535 Returns the current kernel routing table entries.
544 <h3>Return value:
</h3>
545 Table of tables with properties of the corresponding routes.
546 The following fields are defined for route entry tables:
547 {
"dest",
"gateway",
"metric",
"refcount",
"usecount",
"irtt",
557 <dt><a name=
"net.routes6"></a><strong>routes6
</strong> ()
</dt>
561 Returns the current ipv6 kernel routing table entries.
570 <h3>Return value:
</h3>
571 Table of tables with properties of the corresponding routes.
572 The following fields are defined for route entry tables:
573 {
"source",
"dest",
"nexthop",
"metric",
"refcount",
"usecount",
587 </div> <!-- id="content" -->
589 </div> <!-- id="main" -->
592 <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>
593 </div> <!-- id="about" -->
595 </div> <!-- id="container" -->