1
0

luci.sys.net.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  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"/-->
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <div id="navigation">
  18. <h1>LuaDoc</h1>
  19. <ul>
  20. <li><a href="../index.html">Index</a></li>
  21. </ul>
  22. <!-- Module list -->
  23. <h1>Modules</h1>
  24. <ul>
  25. <li>
  26. <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
  27. </li>
  28. <li>
  29. <a href="../modules/luci.http.html">luci.http</a>
  30. </li>
  31. <li>
  32. <a href="../modules/luci.http.protocol.html">luci.http.protocol</a>
  33. </li>
  34. <li>
  35. <a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
  36. </li>
  37. <li>
  38. <a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
  39. </li>
  40. <li>
  41. <a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.mime</a>
  42. </li>
  43. <li>
  44. <a href="../modules/luci.i18n.html">luci.i18n</a>
  45. </li>
  46. <li>
  47. <a href="../modules/luci.ip.html">luci.ip</a>
  48. </li>
  49. <li>
  50. <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
  51. </li>
  52. <li>
  53. <a href="../modules/luci.json.html">luci.json</a>
  54. </li>
  55. <li>
  56. <a href="../modules/luci.jsonc.html">luci.jsonc</a>
  57. </li>
  58. <li>
  59. <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
  60. </li>
  61. <li>
  62. <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
  63. </li>
  64. <li>
  65. <a href="../modules/luci.model.uci.html">luci.model.uci</a>
  66. </li>
  67. <li>
  68. <a href="../modules/luci.rpcc.html">luci.rpcc</a>
  69. </li>
  70. <li>
  71. <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
  72. </li>
  73. <li>
  74. <a href="../modules/luci.sys.html">luci.sys</a>
  75. </li>
  76. <li>
  77. <a href="../modules/luci.sys.init.html">luci.sys.init</a>
  78. </li>
  79. <li>
  80. <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
  81. </li>
  82. <li><strong>luci.sys.net</strong></li>
  83. <li>
  84. <a href="../modules/luci.sys.process.html">luci.sys.process</a>
  85. </li>
  86. <li>
  87. <a href="../modules/luci.sys.user.html">luci.sys.user</a>
  88. </li>
  89. <li>
  90. <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
  91. </li>
  92. <li>
  93. <a href="../modules/luci.util.html">luci.util</a>
  94. </li>
  95. <li>
  96. <a href="../modules/nixio.html">nixio</a>
  97. </li>
  98. <li>
  99. <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
  100. </li>
  101. <li>
  102. <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
  103. </li>
  104. <li>
  105. <a href="../modules/nixio.File.html">nixio.File</a>
  106. </li>
  107. <li>
  108. <a href="../modules/nixio.README.html">nixio.README</a>
  109. </li>
  110. <li>
  111. <a href="../modules/nixio.Socket.html">nixio.Socket</a>
  112. </li>
  113. <li>
  114. <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
  115. </li>
  116. <li>
  117. <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
  118. </li>
  119. <li>
  120. <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
  121. </li>
  122. <li>
  123. <a href="../modules/nixio.bin.html">nixio.bin</a>
  124. </li>
  125. <li>
  126. <a href="../modules/nixio.bit.html">nixio.bit</a>
  127. </li>
  128. <li>
  129. <a href="../modules/nixio.crypto.html">nixio.crypto</a>
  130. </li>
  131. <li>
  132. <a href="../modules/nixio.fs.html">nixio.fs</a>
  133. </li>
  134. </ul>
  135. <!-- File list -->
  136. </div><!-- id="navigation" -->
  137. <div id="content">
  138. <h1>Class <code>luci.sys.net</code></h1>
  139. <p>
  140. LuCI system utilities / network related functions.
  141. </p>
  142. <h2>Functions</h2>
  143. <table class="function_list">
  144. <tr>
  145. <td class="name" nowrap><a href="#net.arptable">arptable</a>&nbsp;()</td>
  146. <td class="summary">
  147. Returns the current arp-table entries as two-dimensional table.</td>
  148. </tr>
  149. <tr>
  150. <td class="name" nowrap><a href="#net.conntrack">conntrack</a>&nbsp;()</td>
  151. <td class="summary">
  152. Returns conntrack information
  153. </td>
  154. </tr>
  155. <tr>
  156. <td class="name" nowrap><a href="#net.deviceinfo">deviceinfo</a>&nbsp;()</td>
  157. <td class="summary">
  158. Return information about available network interfaces.</td>
  159. </tr>
  160. <tr>
  161. <td class="name" nowrap><a href="#net.devices">devices</a>&nbsp;()</td>
  162. <td class="summary">
  163. Determine the names of available network interfaces.</td>
  164. </tr>
  165. <tr>
  166. <td class="name" nowrap><a href="#net.host_hints">host_hints</a>&nbsp;()</td>
  167. <td class="summary">
  168. Returns a two-dimensional table of host hints.</td>
  169. </tr>
  170. <tr>
  171. <td class="name" nowrap><a href="#net.ipv4_hints">ipv4_hints</a>&nbsp;()</td>
  172. <td class="summary">
  173. Returns a two-dimensional table of IPv4 address hints.</td>
  174. </tr>
  175. <tr>
  176. <td class="name" nowrap><a href="#net.ipv6_hints">ipv6_hints</a>&nbsp;()</td>
  177. <td class="summary">
  178. Returns a two-dimensional table of IPv6 address hints.</td>
  179. </tr>
  180. <tr>
  181. <td class="name" nowrap><a href="#net.mac_hints">mac_hints</a>&nbsp;()</td>
  182. <td class="summary">
  183. Returns a two-dimensional table of mac address hints.</td>
  184. </tr>
  185. <tr>
  186. <td class="name" nowrap><a href="#net.pingtest">pingtest</a>&nbsp;(host)</td>
  187. <td class="summary">
  188. Tests whether the given host responds to ping probes.</td>
  189. </tr>
  190. <tr>
  191. <td class="name" nowrap><a href="#net.routes">routes</a>&nbsp;()</td>
  192. <td class="summary">
  193. Returns the current kernel routing table entries.</td>
  194. </tr>
  195. <tr>
  196. <td class="name" nowrap><a href="#net.routes6">routes6</a>&nbsp;()</td>
  197. <td class="summary">
  198. Returns the current ipv6 kernel routing table entries.</td>
  199. </tr>
  200. </table>
  201. <br/>
  202. <br/>
  203. <h2><a name="functions"></a>Functions</h2>
  204. <dl class="function">
  205. <dt><a name="net.arptable"></a><strong>arptable</strong>&nbsp;()</dt>
  206. <dd>
  207. Returns the current arp-table entries as two-dimensional table.
  208. <h3>Return value:</h3>
  209. Table of table containing the current arp entries.
  210. The following fields are defined for arp entry objects:
  211. { "IP address", "HW address", "HW type", "Flags", "Mask", "Device" }
  212. </dd>
  213. <dt><a name="net.conntrack"></a><strong>conntrack</strong>&nbsp;()</dt>
  214. <dd>
  215. Returns conntrack information
  216. <h3>Return value:</h3>
  217. Table with the currently tracked IP connections
  218. </dd>
  219. <dt><a name="net.deviceinfo"></a><strong>deviceinfo</strong>&nbsp;()</dt>
  220. <dd>
  221. Return information about available network interfaces.
  222. <h3>Return value:</h3>
  223. Table containing all current interface names and their information
  224. </dd>
  225. <dt><a name="net.devices"></a><strong>devices</strong>&nbsp;()</dt>
  226. <dd>
  227. Determine the names of available network interfaces.
  228. <h3>Return value:</h3>
  229. Table containing all current interface names
  230. </dd>
  231. <dt><a name="net.host_hints"></a><strong>host_hints</strong>&nbsp;()</dt>
  232. <dd>
  233. Returns a two-dimensional table of host hints.
  234. <h3>Return value:</h3>
  235. Table of table containing known hosts from various sources,
  236. indexed by mac address. Each subtable contains at least one
  237. of the fields "name", "ipv4" or "ipv6".
  238. </dd>
  239. <dt><a name="net.ipv4_hints"></a><strong>ipv4_hints</strong>&nbsp;()</dt>
  240. <dd>
  241. Returns a two-dimensional table of IPv4 address hints.
  242. <h3>Return value:</h3>
  243. Table of table containing known hosts from various sources.
  244. Each entry contains the values in the following order:
  245. [ "ip", "name" ]
  246. </dd>
  247. <dt><a name="net.ipv6_hints"></a><strong>ipv6_hints</strong>&nbsp;()</dt>
  248. <dd>
  249. Returns a two-dimensional table of IPv6 address hints.
  250. <h3>Return value:</h3>
  251. Table of table containing known hosts from various sources.
  252. Each entry contains the values in the following order:
  253. [ "ip", "name" ]
  254. </dd>
  255. <dt><a name="net.mac_hints"></a><strong>mac_hints</strong>&nbsp;()</dt>
  256. <dd>
  257. Returns a two-dimensional table of mac address hints.
  258. <h3>Return value:</h3>
  259. Table of table containing known hosts from various sources.
  260. Each entry contains the values in the following order:
  261. [ "mac", "name" ]
  262. </dd>
  263. <dt><a name="net.pingtest"></a><strong>pingtest</strong>&nbsp;(host)</dt>
  264. <dd>
  265. Tests whether the given host responds to ping probes.
  266. <h3>Parameters</h3>
  267. <ul>
  268. <li>
  269. host: String containing a hostname or IPv4 address
  270. </li>
  271. </ul>
  272. <h3>Return value:</h3>
  273. Number containing 0 on success and >= 1 on error
  274. </dd>
  275. <dt><a name="net.routes"></a><strong>routes</strong>&nbsp;()</dt>
  276. <dd>
  277. Returns the current kernel routing table entries.
  278. <h3>Return value:</h3>
  279. Table of tables with properties of the corresponding routes.
  280. The following fields are defined for route entry tables:
  281. { "dest", "gateway", "metric", "refcount", "usecount", "irtt",
  282. "flags", "device" }
  283. </dd>
  284. <dt><a name="net.routes6"></a><strong>routes6</strong>&nbsp;()</dt>
  285. <dd>
  286. Returns the current ipv6 kernel routing table entries.
  287. <h3>Return value:</h3>
  288. Table of tables with properties of the corresponding routes.
  289. The following fields are defined for route entry tables:
  290. { "source", "dest", "nexthop", "metric", "refcount", "usecount",
  291. "flags", "device" }
  292. </dd>
  293. </dl>
  294. </div> <!-- id="content" -->
  295. </div> <!-- id="main" -->
  296. <div id="about">
  297. <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>
  298. </div> <!-- id="about" -->
  299. </div> <!-- id="container" -->
  300. </body>
  301. </html>