diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-11-05 10:27:59 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-05 10:42:54 +0100 |
commit | baa727de93db009f90d70a80a9861758a24eae77 (patch) | |
tree | fd91ac853abc2feef5496720e5284e911ad1b020 /documentation/api | |
parent | 355a48866d1a43df9443a3b559c8ec8642343f3a (diff) |
docs: rename documentation folder to docs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'documentation/api')
38 files changed, 0 insertions, 27127 deletions
diff --git a/documentation/api/index.html b/documentation/api/index.html deleted file mode 100644 index 5e3f3c211a..0000000000 --- a/documentation/api/index.html +++ /dev/null @@ -1,426 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><strong>Index</strong></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="modules/nixio.html">nixio</a> - </li> - - <li> - <a href="modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - -</div> <!-- id="navigation" --> - -<div id="content"> - - - -<h2>Modules</h2> -<table class="module_list"> -<!--<tr><td colspan="2">Modules</td></tr>--> - - <tr> - <td class="name"><a href="modules/luci.dispatcher.html">luci.dispatcher</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.http.html">luci.http</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.http.conditionals.html">luci.http.conditionals</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.http.date.html">luci.http.date</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.http.mime.html">luci.http.mime</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.i18n.html">luci.i18n</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.ip.html">luci.ip</a></td> - <td class="summary"> - LuCI IP calculation and netlink access library.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.ip.cidr.html">luci.ip.cidr</a></td> - <td class="summary"> - IP CIDR Object.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.json.html">luci.json</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.jsonc.html">luci.jsonc</a></td> - <td class="summary"> - LuCI JSON parsing and serialization library.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.jsonc.parser.html">luci.jsonc.parser</a></td> - <td class="summary"> - LuCI JSON parser instance.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.model.ipkg.html">luci.model.ipkg</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.model.uci.html">luci.model.uci</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.rpcc.html">luci.rpcc</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.html">luci.sys</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.init.html">luci.sys.init</a></td> - <td class="summary"> - -LuCI system utilities / init related functions.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.iptparser.html">luci.sys.iptparser</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.net.html">luci.sys.net</a></td> - <td class="summary"> - -LuCI system utilities / network related functions.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.process.html">luci.sys.process</a></td> - <td class="summary"> - -LuCI system utilities / process related functions.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.user.html">luci.sys.user</a></td> - <td class="summary"> - -LuCI system utilities / user related functions.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.sys.wifi.html">luci.sys.wifi</a></td> - <td class="summary"> - -LuCI system utilities / wifi related functions.</td> - </tr> - - <tr> - <td class="name"><a href="modules/luci.util.html">luci.util</a></td> - <td class="summary"></td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.html">nixio</a></td> - <td class="summary"> - General POSIX IO library.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a></td> - <td class="summary"> - Changes and improvements.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.CryptoHash.html">nixio.CryptoHash</a></td> - <td class="summary"> - Cryptographical Hash and HMAC object.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.File.html">nixio.File</a></td> - <td class="summary"> - Large File Object.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.README.html">nixio.README</a></td> - <td class="summary"> - General Information.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.Socket.html">nixio.Socket</a></td> - <td class="summary"> - Socket Object.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.TLSContext.html">nixio.TLSContext</a></td> - <td class="summary"> - Transport Layer Security Context Object.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.TLSSocket.html">nixio.TLSSocket</a></td> - <td class="summary"> - TLS Socket Object.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a></td> - <td class="summary"> - Unified high-level I/O utility API for Files, Sockets and TLS-Sockets.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.bin.html">nixio.bin</a></td> - <td class="summary"> - Binary operations and conversion.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.bit.html">nixio.bit</a></td> - <td class="summary"> - Bitfield operators and mainpulation functions.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.crypto.html">nixio.crypto</a></td> - <td class="summary"> - Cryptographical library.</td> - </tr> - - <tr> - <td class="name"><a href="modules/nixio.fs.html">nixio.fs</a></td> - <td class="summary"> - Low-level and high-level filesystem manipulation library.</td> - </tr> - -</table> - - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/luadoc.css b/documentation/api/luadoc.css deleted file mode 100644 index f9f9749519..0000000000 --- a/documentation/api/luadoc.css +++ /dev/null @@ -1,285 +0,0 @@ -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color:#ffffff; margin:0px; -} - -code { - font-family: "Andale Mono", monospace; -} - -tt { - font-family: "Andale Mono", monospace; -} - -body, td, th { font-size: 11pt; } - -h1, h2, h3, h4 { margin-left: 0em; } - -textarea, pre, tt { font-size:10pt; } -body, td, th { color:#000000; } -small { font-size:0.85em; } -h1 { font-size:1.5em; } -h2 { font-size:1.25em; } -h3 { font-size:1.15em; } -h4 { font-size:1.06em; } - -a:link { font-weight:bold; color: #004080; text-decoration: none; } -a:visited { font-weight:bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration:underline; } -hr { color:#cccccc } -img { border-width: 0px; } - - -h3 { padding: 1em 0 0.5em; } - -p { margin-left: 1em; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; - margin-left: 0em; -} - -blockquote { margin-left: 3em; } - -pre.example { - background-color: rgb(245, 245, 245); - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: silver; - border-right-color: silver; - border-bottom-color: silver; - border-left-color: silver; - padding: 1em; - margin-left: 1em; - margin-right: 1em; - font-family: "Andale Mono", monospace; - font-size: smaller; -} - - -hr { - margin-left: 0em; - background: #00007f; - border: 0px; - height: 1px; -} - -ul { list-style-type: disc; } - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } -table.index ul { padding-top: 0em; margin-top: 0em; } - -table { - border: 1px solid black; - border-collapse: collapse; - margin: 1em auto; -} -th { - border: 1px solid black; - padding: 0.5em; -} -td { - border: 1px solid black; - padding: 0.5em; -} -div.header, div.footer { margin-left: 0em; } - -#container -{ - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product -{ - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#product_logo -{ -} - -#product_name -{ -} - -#product_description -{ -} - -#main -{ - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation -{ - float: left; - width: 18em; - margin: 0; - vertical-align: top; - background-color: #f0f0f0; - overflow:visible; -} - -#navigation h1 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align:left; - margin:0px; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - padding: 0; - margin: 1px; -} - -#navigation li -{ - text-indent: -1em; - margin: 0em 0em 0em 0.5em; - display: block; - padding: 3px 0px 0px 12px; -} - -#navigation li li a -{ - padding: 0px 3px 0px -1em; -} - -#content -{ - margin-left: 18em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about -{ - clear: both; - margin: 0; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 12pt "Times New Roman", "TimeNR", Times, serif; - } - a { font-weight:bold; color: #004080; text-decoration: underline; } - - #main
{
background-color: #ffffff;
border-left: 0px;
}
- #container
{
margin-left: 2%;
margin-right: 2%;
background-color: #ffffff;
} - - #content
{
margin-left: 0px;
padding: 1em;
border-left: 0px;
border-right: 0px;
background-color: #ffffff;
} - - #navigation
{
display: none; - } - pre.example { - font-family: "Andale Mono", monospace; - font-size: 10pt; - page-break-inside: avoid; - } -} - -table.module_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.module_list td.name { background-color: #f0f0f0; } -table.module_list td.summary { width: 100%; } - -table.file_list -{ - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.file_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.file_list td.name { background-color: #f0f0f0; } -table.file_list td.summary { width: 100%; } - - -table.function_list -{ - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.function_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.function_list td.name { background-color: #f0f0f0; } -table.function_list td.summary { width: 100%; } - - -table.table_list -{ - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.table_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.table_list td.name { background-color: #f0f0f0; } -table.table_list td.summary { width: 100%; } - -dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.function dd {padding: 0.5em 0;} -dl.function h3 {margin: 0; font-size: medium;} - -dl.table dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.table dd {padding-bottom: 1em;} -dl.table h3 {padding: 0; margin: 0; font-size: medium;} - -#TODO: make module_list, file_list, function_list, table_list inherit from a list - diff --git a/documentation/api/modules/luci.dispatcher.html b/documentation/api/modules/luci.dispatcher.html deleted file mode 100644 index ea33a5c706..0000000000 --- a/documentation/api/modules/luci.dispatcher.html +++ /dev/null @@ -1,1145 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li><strong>luci.dispatcher</strong></li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.dispatcher</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#_">_</a> ()</td> - <td class="summary"> - -No-op function used to mark translation entries for menu labels.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#alias">alias</a> (...)</td> - <td class="summary"> - -Create a redirect to another dispatching node.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#arcombine">arcombine</a> (trg1, trg2)</td> - <td class="summary"> - -Create a combined dispatching target for non argv and argv requests.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#assign">assign</a> (path, clone, title, order)</td> - <td class="summary"> - -Clone a node of the dispatching tree to another position.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#build_url">build_url</a> (...)</td> - <td class="summary"> - -Build the URL relative to the server webroot from given virtual path.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#call">call</a> (name, ...)</td> - <td class="summary"> - -Create a function-call dispatching target.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cbi">cbi</a> (model)</td> - <td class="summary"> - -Create a CBI model dispatching target.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#createindex">createindex</a> ()</td> - <td class="summary"> - -Generate the dispatching index using the native file-cache based strategy.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#createtree">createtree</a> ()</td> - <td class="summary"> - -Create the dispatching tree from the index.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#dispatch">dispatch</a> (request)</td> - <td class="summary"> - -Dispatches a LuCI virtual path.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#entry">entry</a> (path, target, title, order)</td> - <td class="summary"> - -Create a new dispatching node and define common parameters.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#error404">error404</a> (message)</td> - <td class="summary"> - -Send a 404 error code and render the "error404" template if available.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#error500">error500</a> (message)</td> - <td class="summary"> - -Send a 500 error code and render the "error500" template if available.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#firstchild">firstchild</a> ()</td> - <td class="summary"> - -Alias the first (lowest order) page automatically - - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#form">form</a> (model)</td> - <td class="summary"> - -Create a CBI form model dispatching target.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#get">get</a> (...)</td> - <td class="summary"> - -Fetch or create a dispatching node without setting the target module or -enabling the node.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#httpdispatch">httpdispatch</a> (request)</td> - <td class="summary"> - -Dispatch an HTTP request.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#lookup">lookup</a> (...)</td> - <td class="summary"> - -Lookup node in dispatching tree.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#node">node</a> (...)</td> - <td class="summary"> - -Fetch or create a new dispatching node.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#node_childs">node_childs</a> (node)</td> - <td class="summary"> - -Return a sorted table of visible children within a given node - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#node_visible">node_visible</a> (node)</td> - <td class="summary"> - -Check whether a dispatch node shall be visible - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#rewrite">rewrite</a> (n, ...)</td> - <td class="summary"> - -Rewrite the first x path values of the request.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#template">template</a> (name)</td> - <td class="summary"> - -Create a template render dispatching target.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#translate">translate</a> (text)</td> - <td class="summary"> - -Access the luci.i18n translate() api.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="_"></a><strong>_</strong> ()</dt> -<dd> - - -No-op function used to mark translation entries for menu labels. - -This function does not actually translate the given argument but -is used by build/i18n-scan.pl to find translatable entries. - - - - - - - - - - -</dd> - - - - -<dt><a name="alias"></a><strong>alias</strong> (...)</dt> -<dd> - - -Create a redirect to another dispatching node. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: Virtual path destination - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="arcombine"></a><strong>arcombine</strong> (trg1, trg2)</dt> -<dd> - - -Create a combined dispatching target for non argv and argv requests. - - - -<h3>Parameters</h3> -<ul> - - <li> - trg1: Overview Target - </li> - - <li> - trg2: Detail Target - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="assign"></a><strong>assign</strong> (path, clone, title, order)</dt> -<dd> - - -Clone a node of the dispatching tree to another position. - - - -<h3>Parameters</h3> -<ul> - - <li> - path: Virtual path destination - </li> - - <li> - clone: Virtual path source - </li> - - <li> - title: Destination node title (optional) - </li> - - <li> - order: Destination node order value (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Dispatching tree node - - - -</dd> - - - - -<dt><a name="build_url"></a><strong>build_url</strong> (...)</dt> -<dd> - - -Build the URL relative to the server webroot from given virtual path. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: Virtual path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Relative URL - - - -</dd> - - - - -<dt><a name="call"></a><strong>call</strong> (name, ...)</dt> -<dd> - - -Create a function-call dispatching target. - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Target function of local controller - </li> - - <li> - ...: Additional parameters passed to the function - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="cbi"></a><strong>cbi</strong> (model)</dt> -<dd> - - -Create a CBI model dispatching target. - - - -<h3>Parameters</h3> -<ul> - - <li> - model: CBI model to be rendered - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="createindex"></a><strong>createindex</strong> ()</dt> -<dd> - - -Generate the dispatching index using the native file-cache based strategy. - - - - - - - - - - - -</dd> - - - - -<dt><a name="createtree"></a><strong>createtree</strong> ()</dt> -<dd> - - -Create the dispatching tree from the index. - -Build the index before if it does not exist yet. - - - - - - - - - - -</dd> - - - - -<dt><a name="dispatch"></a><strong>dispatch</strong> (request)</dt> -<dd> - - -Dispatches a LuCI virtual path. - - - -<h3>Parameters</h3> -<ul> - - <li> - request: Virtual path - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="entry"></a><strong>entry</strong> (path, target, title, order)</dt> -<dd> - - -Create a new dispatching node and define common parameters. - - - -<h3>Parameters</h3> -<ul> - - <li> - path: Virtual path - </li> - - <li> - target: Target function to call when dispatched. - </li> - - <li> - title: Destination node title - </li> - - <li> - order: Destination node order value (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Dispatching tree node - - - -</dd> - - - - -<dt><a name="error404"></a><strong>error404</strong> (message)</dt> -<dd> - - -Send a 404 error code and render the "error404" template if available. - - - -<h3>Parameters</h3> -<ul> - - <li> - message: Custom error message (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -false - - - -</dd> - - - - -<dt><a name="error500"></a><strong>error500</strong> (message)</dt> -<dd> - - -Send a 500 error code and render the "error500" template if available. - - - -<h3>Parameters</h3> -<ul> - - <li> - message: Custom error message (optional)# - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -false - - - -</dd> - - - - -<dt><a name="firstchild"></a><strong>firstchild</strong> ()</dt> -<dd> - - -Alias the first (lowest order) page automatically - - - - - - - - - - - -</dd> - - - - -<dt><a name="form"></a><strong>form</strong> (model)</dt> -<dd> - - -Create a CBI form model dispatching target. - - - -<h3>Parameters</h3> -<ul> - - <li> - model: CBI form model tpo be rendered - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="get"></a><strong>get</strong> (...)</dt> -<dd> - - -Fetch or create a dispatching node without setting the target module or -enabling the node. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: Virtual path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Dispatching tree node - - - -</dd> - - - - -<dt><a name="httpdispatch"></a><strong>httpdispatch</strong> (request)</dt> -<dd> - - -Dispatch an HTTP request. - - - -<h3>Parameters</h3> -<ul> - - <li> - request: LuCI HTTP Request object - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="lookup"></a><strong>lookup</strong> (...)</dt> -<dd> - - -Lookup node in dispatching tree. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: Virtual path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Node object, canonical url or nil if the path was not found. - - - -</dd> - - - - -<dt><a name="node"></a><strong>node</strong> (...)</dt> -<dd> - - -Fetch or create a new dispatching node. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: Virtual path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Dispatching tree node - - - -</dd> - - - - -<dt><a name="node_childs"></a><strong>node_childs</strong> (node)</dt> -<dd> - - -Return a sorted table of visible children within a given node - - - -<h3>Parameters</h3> -<ul> - - <li> - node: Dispatch node - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Ordered table of child node names - - - -</dd> - - - - -<dt><a name="node_visible"></a><strong>node_visible</strong> (node)</dt> -<dd> - - -Check whether a dispatch node shall be visible - - - -<h3>Parameters</h3> -<ul> - - <li> - node: Dispatch node - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating whether the node should be visible - - - -</dd> - - - - -<dt><a name="rewrite"></a><strong>rewrite</strong> (n, ...)</dt> -<dd> - - -Rewrite the first x path values of the request. - - - -<h3>Parameters</h3> -<ul> - - <li> - n: Number of path values to replace - </li> - - <li> - ...: Virtual path to replace removed path values with - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="template"></a><strong>template</strong> (name)</dt> -<dd> - - -Create a template render dispatching target. - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Template to be rendered - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="translate"></a><strong>translate</strong> (text)</dt> -<dd> - - -Access the luci.i18n translate() api. - - - -<h3>Parameters</h3> -<ul> - - <li> - text: Text to translate - </li> - -</ul> - - - - - - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.http.conditionals.html b/documentation/api/modules/luci.http.conditionals.html deleted file mode 100644 index 8c940bd3f6..0000000000 --- a/documentation/api/modules/luci.http.conditionals.html +++ /dev/null @@ -1,552 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li><strong>luci.http.conditionals</strong></li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.http.conditionals</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#if_match">if_match</a> (req, stat)</td> - <td class="summary"> - -14.24 / If-Match - -Test whether the given message object contains an "If-Match" header and -compare it against the given stat object.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#if_modified_since">if_modified_since</a> (req, stat)</td> - <td class="summary"> - -14.25 / If-Modified-Since - -Test whether the given message object contains an "If-Modified-Since" header -and compare it against the given stat object.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#if_none_match">if_none_match</a> (req, stat)</td> - <td class="summary"> - -14.26 / If-None-Match - -Test whether the given message object contains an "If-None-Match" header and -compare it against the given stat object.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#if_range">if_range</a> (req, stat)</td> - <td class="summary"> - -14.27 / If-Range - -The If-Range header is currently not implemented due to the lack of general -byte range stuff in luci.http.protocol .</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#if_unmodified_since">if_unmodified_since</a> (req, stat)</td> - <td class="summary"> - -14.28 / If-Unmodified-Since - -Test whether the given message object contains an "If-Unmodified-Since" -header and compare it against the given stat object.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#mk_etag">mk_etag</a> (stat)</td> - <td class="summary"> - -Implement 14.19 / ETag.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="if_match"></a><strong>if_match</strong> (req, stat)</dt> -<dd> - - -14.24 / If-Match - -Test whether the given message object contains an "If-Match" header and -compare it against the given stat object. - - -<h3>Parameters</h3> -<ul> - - <li> - req: HTTP request message object - </li> - - <li> - stat: A file.stat object - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating whether the precondition is ok - - <li>Alternative status code if the precondition failed - -</ol> - - - -</dd> - - - - -<dt><a name="if_modified_since"></a><strong>if_modified_since</strong> (req, stat)</dt> -<dd> - - -14.25 / If-Modified-Since - -Test whether the given message object contains an "If-Modified-Since" header -and compare it against the given stat object. - - -<h3>Parameters</h3> -<ul> - - <li> - req: HTTP request message object - </li> - - <li> - stat: A file.stat object - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating whether the precondition is ok - - <li>Alternative status code if the precondition failed - - <li>Table containing extra HTTP headers if the precondition failed - -</ol> - - - -</dd> - - - - -<dt><a name="if_none_match"></a><strong>if_none_match</strong> (req, stat)</dt> -<dd> - - -14.26 / If-None-Match - -Test whether the given message object contains an "If-None-Match" header and -compare it against the given stat object. - - -<h3>Parameters</h3> -<ul> - - <li> - req: HTTP request message object - </li> - - <li> - stat: A file.stat object - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating whether the precondition is ok - - <li>Alternative status code if the precondition failed - - <li>Table containing extra HTTP headers if the precondition failed - -</ol> - - - -</dd> - - - - -<dt><a name="if_range"></a><strong>if_range</strong> (req, stat)</dt> -<dd> - - -14.27 / If-Range - -The If-Range header is currently not implemented due to the lack of general -byte range stuff in luci.http.protocol . This function will always return -false, 412 to indicate a failed precondition. - - -<h3>Parameters</h3> -<ul> - - <li> - req: HTTP request message object - </li> - - <li> - stat: A file.stat object - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating whether the precondition is ok - - <li>Alternative status code if the precondition failed - -</ol> - - - -</dd> - - - - -<dt><a name="if_unmodified_since"></a><strong>if_unmodified_since</strong> (req, stat)</dt> -<dd> - - -14.28 / If-Unmodified-Since - -Test whether the given message object contains an "If-Unmodified-Since" -header and compare it against the given stat object. - - -<h3>Parameters</h3> -<ul> - - <li> - req: HTTP request message object - </li> - - <li> - stat: A file.stat object - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating whether the precondition is ok - - <li>Alternative status code if the precondition failed - -</ol> - - - -</dd> - - - - -<dt><a name="mk_etag"></a><strong>mk_etag</strong> (stat)</dt> -<dd> - - -Implement 14.19 / ETag. - - - -<h3>Parameters</h3> -<ul> - - <li> - stat: A file.stat structure - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the generated tag suitable for ETag headers - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.http.date.html b/documentation/api/modules/luci.http.date.html deleted file mode 100644 index 1ec5beb8b7..0000000000 --- a/documentation/api/modules/luci.http.date.html +++ /dev/null @@ -1,406 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li><strong>luci.http.date</strong></li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.http.date</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#compare">compare</a> (d1, d2)</td> - <td class="summary"> - -Compare two dates which can either be unix epoch times or HTTP date strings.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#to_http">to_http</a> (time)</td> - <td class="summary"> - -Convert the given unix epoch time to valid HTTP date string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#to_unix">to_unix</a> (data)</td> - <td class="summary"> - -Parse given HTTP date string and convert it to unix epoch time.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#tz_offset">tz_offset</a> (tz)</td> - <td class="summary"> - -Return the time offset in seconds between the UTC and given time zone.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="compare"></a><strong>compare</strong> (d1, d2)</dt> -<dd> - - -Compare two dates which can either be unix epoch times or HTTP date strings. - - - -<h3>Parameters</h3> -<ul> - - <li> - d1: The first date or epoch time to compare - </li> - - <li> - d2: The first date or epoch time to compare - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>-1 - if d1 is lower then d2 - - <li>0 - if both dates are equal - - <li>1 - if d1 is higher then d2 - -</ol> - - - -</dd> - - - - -<dt><a name="to_http"></a><strong>to_http</strong> (time)</dt> -<dd> - - -Convert the given unix epoch time to valid HTTP date string. - - - -<h3>Parameters</h3> -<ul> - - <li> - time: Unix epoch time - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the formatted date - - - -</dd> - - - - -<dt><a name="to_unix"></a><strong>to_unix</strong> (data)</dt> -<dd> - - -Parse given HTTP date string and convert it to unix epoch time. - - - -<h3>Parameters</h3> -<ul> - - <li> - data: String containing the date - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Unix epoch time - - - -</dd> - - - - -<dt><a name="tz_offset"></a><strong>tz_offset</strong> (tz)</dt> -<dd> - - -Return the time offset in seconds between the UTC and given time zone. - - - -<h3>Parameters</h3> -<ul> - - <li> - tz: Symbolic or numeric timezone specifier - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Time offset to UTC in seconds - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.http.html b/documentation/api/modules/luci.http.html deleted file mode 100644 index 4731727849..0000000000 --- a/documentation/api/modules/luci.http.html +++ /dev/null @@ -1,1267 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li><strong>luci.http</strong></li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.http</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#build_querystring">build_querystring</a> (table)</td> - <td class="summary"> - -Create a querystring out of a table of key - value pairs.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#close">close</a> ()</td> - <td class="summary"> - -Close the HTTP-Connection.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#content">content</a> ()</td> - <td class="summary"> - -Return the request content if the request was of unknown type.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#formvalue">formvalue</a> (name, noparse)</td> - <td class="summary"> - -Get a certain HTTP input value or a table of all input values.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#formvaluetable">formvaluetable</a> (prefix)</td> - <td class="summary"> - -Get a table of all HTTP input values with a certain prefix.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#getcookie">getcookie</a> (name)</td> - <td class="summary"> - -Get the value of a certain HTTP-Cookie.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#getenv">getenv</a> (name)</td> - <td class="summary"> - -Get the value of a certain HTTP environment variable -or the environment table itself.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#header">header</a> (key, value)</td> - <td class="summary"> - -Send a HTTP-Header.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#mimedecode_message_body">mimedecode_message_body</a> (src, msg, filecb)</td> - <td class="summary"> - -Decode a mime encoded http message body with multipart/form-data Content-Type.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parse_message_body">parse_message_body</a> (src, msg, filecb)</td> - <td class="summary"> - -Try to extract and decode a http message body from the given ltn12 source.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#prepare_content">prepare_content</a> (mime)</td> - <td class="summary"> - -Set the mime type of following content data.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#redirect">redirect</a> (url)</td> - <td class="summary"> - -Redirects the client to a new URL and closes the connection.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#setfilehandler">setfilehandler</a> (callback)</td> - <td class="summary"> - -Set a handler function for incoming user file uploads.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#source">source</a> ()</td> - <td class="summary"> - -Get the RAW HTTP input source - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#splice">splice</a> (fp, size)</td> - <td class="summary"> - -Splice data from a filedescriptor to the client.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#status">status</a> (code, message)</td> - <td class="summary"> - -Set the HTTP status code and status message.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urldecode">urldecode</a> (str, no_plus)</td> - <td class="summary"> - -Return the URL-decoded equivalent of a string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urldecode_message_body">urldecode_message_body</a> (src, msg)</td> - <td class="summary"> - -Decode an urlencoded http message body with application/x-www-urlencoded -Content-Type.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urldecode_params">urldecode_params</a> (url, tbl)</td> - <td class="summary"> - -Extract and split urlencoded data pairs, separated bei either "&" or ";" -from given url or string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urlencode">urlencode</a> (str)</td> - <td class="summary"> - -Return the URL-encoded equivalent of a string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urlencode_params">urlencode_params</a> (tbl)</td> - <td class="summary"> - -Encode each key-value-pair in given table to x-www-urlencoded format, -separated by "&".</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#write">write</a> (content, src_err)</td> - <td class="summary"> - -Send a chunk of content data to the client.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#write_json">write_json</a> (data)</td> - <td class="summary"> - -Send the given data as JSON encoded string.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="build_querystring"></a><strong>build_querystring</strong> (table)</dt> -<dd> - - -Create a querystring out of a table of key - value pairs. - - - -<h3>Parameters</h3> -<ul> - - <li> - table: Query string source table - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Encoded HTTP query string - - - -</dd> - - - - -<dt><a name="close"></a><strong>close</strong> ()</dt> -<dd> - - -Close the HTTP-Connection. - - - - - - - - - - -</dd> - - - - -<dt><a name="content"></a><strong>content</strong> ()</dt> -<dd> - - -Return the request content if the request was of unknown type. - - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>HTTP request body - - <li>HTTP request body length - -</ol> - - - -</dd> - - - - -<dt><a name="formvalue"></a><strong>formvalue</strong> (name, noparse)</dt> -<dd> - - -Get a certain HTTP input value or a table of all input values. - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the GET or POST variable to fetch - </li> - - <li> - noparse: Don't parse POST data before getting the value - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -HTTP input value or table of all input value - - - -</dd> - - - - -<dt><a name="formvaluetable"></a><strong>formvaluetable</strong> (prefix)</dt> -<dd> - - -Get a table of all HTTP input values with a certain prefix. - - - -<h3>Parameters</h3> -<ul> - - <li> - prefix: Prefix - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table of all HTTP input values with given prefix - - - -</dd> - - - - -<dt><a name="getcookie"></a><strong>getcookie</strong> (name)</dt> -<dd> - - -Get the value of a certain HTTP-Cookie. - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Cookie Name - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing cookie data - - - -</dd> - - - - -<dt><a name="getenv"></a><strong>getenv</strong> (name)</dt> -<dd> - - -Get the value of a certain HTTP environment variable -or the environment table itself. - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Environment variable - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -HTTP environment value or environment table - - - -</dd> - - - - -<dt><a name="header"></a><strong>header</strong> (key, value)</dt> -<dd> - - -Send a HTTP-Header. - - - -<h3>Parameters</h3> -<ul> - - <li> - key: Header key - </li> - - <li> - value: Header value - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="mimedecode_message_body"></a><strong>mimedecode_message_body</strong> (src, msg, filecb)</dt> -<dd> - - -Decode a mime encoded http message body with multipart/form-data Content-Type. - -Stores all extracted data associated with its parameter name -in the params table within the given message object. Multiple parameter -values are stored as tables, ordinary ones as strings. - -If an optional file callback function is given then it is fed with the -file contents chunk by chunk and only the extracted file name is stored -within the params table. The callback function will be called subsequently -with three arguments: - o Table containing decoded (name, file) and raw (headers) mime header data - o String value containing a chunk of the file data - o Boolean which indicates whether the current chunk is the last one (eof) - - - -<h3>Parameters</h3> -<ul> - - <li> - src: Ltn12 source function - </li> - - <li> - msg: HTTP message object - </li> - - <li> - filecb: File callback function (optional) - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Value indicating successful operation (not nil means "ok") - - <li>String containing the error if unsuccessful - -</ol> - - - -<h3>See also:</h3> -<ul> - - <li><a href=""> - parse_message_header - </a> - -</ul> - -</dd> - - - - -<dt><a name="parse_message_body"></a><strong>parse_message_body</strong> (src, msg, filecb)</dt> -<dd> - - -Try to extract and decode a http message body from the given ltn12 source. -This function will examine the Content-Type within the given message object -to select the appropriate content decoder. - -Currently the application/x-www-urlencoded and application/form-data -mime types are supported. If the encountered content encoding can't be -handled then the whole message body will be stored unaltered as "content" -property within the given message object. - - - -<h3>Parameters</h3> -<ul> - - <li> - src: Ltn12 source function - </li> - - <li> - msg: HTTP message object - </li> - - <li> - filecb: File data callback (optional, see mimedecode_message_body()) - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Value indicating successful operation (not nil means "ok") - - <li>String containing the error if unsuccessful - -</ol> - - - -<h3>See also:</h3> -<ul> - - <li><a href=""> - parse_message_header - </a> - -</ul> - -</dd> - - - - -<dt><a name="prepare_content"></a><strong>prepare_content</strong> (mime)</dt> -<dd> - - -Set the mime type of following content data. - - - -<h3>Parameters</h3> -<ul> - - <li> - mime: Mimetype of following content - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="redirect"></a><strong>redirect</strong> (url)</dt> -<dd> - - -Redirects the client to a new URL and closes the connection. - - - -<h3>Parameters</h3> -<ul> - - <li> - url: Target URL - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="setfilehandler"></a><strong>setfilehandler</strong> (callback)</dt> -<dd> - - -Set a handler function for incoming user file uploads. - - - -<h3>Parameters</h3> -<ul> - - <li> - callback: Handler function - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="source"></a><strong>source</strong> ()</dt> -<dd> - - -Get the RAW HTTP input source - - - - - - - - -<h3>Return value:</h3> -HTTP LTN12 source - - - -</dd> - - - - -<dt><a name="splice"></a><strong>splice</strong> (fp, size)</dt> -<dd> - - -Splice data from a filedescriptor to the client. - - - -<h3>Parameters</h3> -<ul> - - <li> - fp: File descriptor - </li> - - <li> - size: Bytes to splice (optional) - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="status"></a><strong>status</strong> (code, message)</dt> -<dd> - - -Set the HTTP status code and status message. - - - -<h3>Parameters</h3> -<ul> - - <li> - code: Status code - </li> - - <li> - message: Status message - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="urldecode"></a><strong>urldecode</strong> (str, no_plus)</dt> -<dd> - - -Return the URL-decoded equivalent of a string. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: URL-encoded string - </li> - - <li> - no_plus: Don't decode + to " " - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -URL-decoded string - - - -<h3>See also:</h3> -<ul> - - <li><a href="#urlencode"> - urlencode - </a> - -</ul> - -</dd> - - - - -<dt><a name="urldecode_message_body"></a><strong>urldecode_message_body</strong> (src, msg)</dt> -<dd> - - -Decode an urlencoded http message body with application/x-www-urlencoded -Content-Type. - -Stores all extracted data associated with its parameter name in the params -table within the given message object. Multiple parameter values are stored -as tables, ordinary ones as strings. - - - -<h3>Parameters</h3> -<ul> - - <li> - src: Ltn12 source function - </li> - - <li> - msg: HTTP message object - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Value indicating successful operation (not nil means "ok") - - <li>String containing the error if unsuccessful - -</ol> - - - -<h3>See also:</h3> -<ul> - - <li><a href=""> - parse_message_header - </a> - -</ul> - -</dd> - - - - -<dt><a name="urldecode_params"></a><strong>urldecode_params</strong> (url, tbl)</dt> -<dd> - - -Extract and split urlencoded data pairs, separated bei either "&" or ";" -from given url or string. Returns a table with urldecoded values. - -Simple parameters are stored as string values associated with the parameter -name within the table. Parameters with multiple values are stored as array -containing the corresponding values. - - - -<h3>Parameters</h3> -<ul> - - <li> - url: The url or string which contains x-www-urlencoded form data - </li> - - <li> - tbl: Use the given table for storing values (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing the urldecoded parameters - - - -<h3>See also:</h3> -<ul> - - <li><a href="#urlencode_params"> - urlencode_params - </a> - -</ul> - -</dd> - - - - -<dt><a name="urlencode"></a><strong>urlencode</strong> (str)</dt> -<dd> - - -Return the URL-encoded equivalent of a string. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: Source string - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -URL-encoded string - - - -<h3>See also:</h3> -<ul> - - <li><a href="#urldecode"> - urldecode - </a> - -</ul> - -</dd> - - - - -<dt><a name="urlencode_params"></a><strong>urlencode_params</strong> (tbl)</dt> -<dd> - - -Encode each key-value-pair in given table to x-www-urlencoded format, -separated by "&". - -Tables are encoded as parameters with multiple values by repeating the -parameter name with each value. - - - -<h3>Parameters</h3> -<ul> - - <li> - tbl: Table with the values - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing encoded values - - - -<h3>See also:</h3> -<ul> - - <li><a href="#urldecode_params"> - urldecode_params - </a> - -</ul> - -</dd> - - - - -<dt><a name="write"></a><strong>write</strong> (content, src_err)</dt> -<dd> - - -Send a chunk of content data to the client. - -This function is as a valid LTN12 sink. -If the content chunk is nil this function will automatically invoke close. - - - -<h3>Parameters</h3> -<ul> - - <li> - content: Content chunk - </li> - - <li> - src_err: Error object from source (optional) - </li> - -</ul> - - - - - - - - -<h3>See also:</h3> -<ul> - - <li><a href="#close"> - close - </a> - -</ul> - -</dd> - - - - -<dt><a name="write_json"></a><strong>write_json</strong> (data)</dt> -<dd> - - -Send the given data as JSON encoded string. - - - -<h3>Parameters</h3> -<ul> - - <li> - data: Data to send - </li> - -</ul> - - - - - - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.http.mime.html b/documentation/api/modules/luci.http.mime.html deleted file mode 100644 index 85eaf53ab0..0000000000 --- a/documentation/api/modules/luci.http.mime.html +++ /dev/null @@ -1,322 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li><strong>luci.http.mime</strong></li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.http.mime</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#to_ext">to_ext</a> (mimetype)</td> - <td class="summary"> - -Return corresponding extension for a given mime type or nil if the - -given mime-type is unknown.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#to_mime">to_mime</a> (filename)</td> - <td class="summary"> - -Extract extension from a filename and return corresponding mime-type or - -"application/octet-stream" if the extension is unknown.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="to_ext"></a><strong>to_ext</strong> (mimetype)</dt> -<dd> - - -Return corresponding extension for a given mime type or nil if the - -given mime-type is unknown. - - -<h3>Parameters</h3> -<ul> - - <li> - mimetype: The mimetype to retrieve the extension from - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String with the extension or nil for unknown type - - - -</dd> - - - - -<dt><a name="to_mime"></a><strong>to_mime</strong> (filename)</dt> -<dd> - - -Extract extension from a filename and return corresponding mime-type or - -"application/octet-stream" if the extension is unknown. - - -<h3>Parameters</h3> -<ul> - - <li> - filename: The filename for which the mime type is guessed - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containign the determined mime type - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.i18n.html b/documentation/api/modules/luci.i18n.html deleted file mode 100644 index 0f315bebd5..0000000000 --- a/documentation/api/modules/luci.i18n.html +++ /dev/null @@ -1,391 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li><strong>luci.i18n</strong></li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.i18n</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#dump">dump</a> ()</td> - <td class="summary"> - -Return all currently loaded translation strings as a key-value table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#setlanguage">setlanguage</a> (lang)</td> - <td class="summary"> - -Set the context default translation language.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#translate">translate</a> (key)</td> - <td class="summary"> - -Return the translated value for a specific translation key.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#translatef">translatef</a> (key, ...)</td> - <td class="summary"> - -Return the translated value for a specific translation key and use it as sprintf pattern.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="dump"></a><strong>dump</strong> ()</dt> -<dd> - - -Return all currently loaded translation strings as a key-value table. The key is the -hexadecimal representation of the translation key while the value is the translated -text content. - - - - - - - - -<h3>Return value:</h3> -Key-value translation string table. - - - -</dd> - - - - -<dt><a name="setlanguage"></a><strong>setlanguage</strong> (lang)</dt> -<dd> - - -Set the context default translation language. - - - -<h3>Parameters</h3> -<ul> - - <li> - lang: An IETF/BCP 47 language tag or ISO3166 country code, e.g. "en-US" or "de" - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -The effective loaded language, e.g. "en" for "en-US" - or nil on failure - - - -</dd> - - - - -<dt><a name="translate"></a><strong>translate</strong> (key)</dt> -<dd> - - -Return the translated value for a specific translation key. - - - -<h3>Parameters</h3> -<ul> - - <li> - key: Default translation text - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Translated string - - - -</dd> - - - - -<dt><a name="translatef"></a><strong>translatef</strong> (key, ...)</dt> -<dd> - - -Return the translated value for a specific translation key and use it as sprintf pattern. - - - -<h3>Parameters</h3> -<ul> - - <li> - key: Default translation text - </li> - - <li> - ...: Format parameters - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Translated and formatted string - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.ip.cidr.html b/documentation/api/modules/luci.ip.cidr.html deleted file mode 100644 index ae6c61dc5d..0000000000 --- a/documentation/api/modules/luci.ip.cidr.html +++ /dev/null @@ -1,1511 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li><strong>luci.ip.cidr</strong></li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.ip.cidr</code></h1> - -<p> - IP CIDR Object. - Represents an IPv4 or IPv6 address range.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#cidr.is4">cidr:is4</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is an IPv4 address range - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.is4rfc1918">cidr:is4rfc1918</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is within the private RFC1918 address space - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.is4linklocal">cidr:is4linklocal</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is an IPv4 link local (Zeroconf) address - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.is6">cidr:is6</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is an IPv6 address range - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.is6linklocal">cidr:is6linklocal</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is an IPv6 link local address - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.is6mapped4">cidr:is6mapped4</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is an IPv6 mapped IPv4 address - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.ismac">cidr:ismac</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is an ethernet MAC address range - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.ismaclocal">cidr:ismaclocal</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is a locally administered (LAA) MAC address - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.ismacmcast">cidr:ismacmcast</a> ()</td> - <td class="summary"> - -Checks whether the CIDR instance is a multicast MAC address - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.lower">cidr:lower</a> (addr)</td> - <td class="summary"> - -Checks whether this CIDR instance is lower than the given argument.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.higher">cidr:higher</a> (addr)</td> - <td class="summary"> - -Checks whether this CIDR instance is higher than the given argument.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.equal">cidr:equal</a> (addr)</td> - <td class="summary"> - -Checks whether this CIDR instance is equal to the given argument.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.prefix">cidr:prefix</a> (mask)</td> - <td class="summary"> - -Get or set prefix size of CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.network">cidr:network</a> (mask)</td> - <td class="summary"> - -Derive network address of CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.host">cidr:host</a> ()</td> - <td class="summary"> - -Derive host address of CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.mask">cidr:mask</a> (mask)</td> - <td class="summary"> - -Derive netmask of CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.broadcast">cidr:broadcast</a> (mask)</td> - <td class="summary"> - -Derive broadcast address of CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.mapped4">cidr:mapped4</a> ()</td> - <td class="summary"> - -Derive mapped IPv4 address of CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.tomac">cidr:tomac</a> ()</td> - <td class="summary"> - -Derive MAC address of IPv6 link local CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.tolinklocal">cidr:tolinklocal</a> ()</td> - <td class="summary"> - -Derive IPv6 link local address from MAC address CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.contains">cidr:contains</a> (addr)</td> - <td class="summary"> - -Test whether CIDR contains given range.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.add">cidr:add</a> (amount, inplace)</td> - <td class="summary"> - -Add given amount to CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.sub">cidr:sub</a> (amount, inplace)</td> - <td class="summary"> - -Subtract given amount from CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.minhost">cidr:minhost</a> ()</td> - <td class="summary"> - -Calculate the lowest possible host address within this CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.maxhost">cidr:maxhost</a> ()</td> - <td class="summary"> - -Calculate the highest possible host address within this CIDR instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cidr.string">cidr:string</a> ()</td> - <td class="summary"> - -Convert CIDR instance into string representation.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="cidr.is4"></a><strong>cidr:is4</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is an IPv4 address range - - - - - - - - -<h3>Return value:</h3> -<code>true</code> if the CIDR is an IPv4 range, else <code>false</code> - - - -<h3>See also:</h3> -<ul> - - <li><a href="#cidr.is6"> - cidr:is6 - </a> - - <li><a href="#cidr.ismac"> - cidr:ismac - </a> - -</ul> - -</dd> - - - - -<dt><a name="cidr.is4rfc1918"></a><strong>cidr:is4rfc1918</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is within the private RFC1918 address space - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.45.2/24") -if addr:is4rfc1918() then - print("Is a private address") -end</pre> - - - -<h3>Return value:</h3> -<code>true</code> if the entire range of this CIDR lies within one of - the ranges <code>10.0.0.0-10.255.255.255</code>, - <code>172.16.0.0-172.31.0.0</code> or - <code>192.168.0.0-192.168.255.255</code>, else <code>false</code>. - - - -</dd> - - - - -<dt><a name="cidr.is4linklocal"></a><strong>cidr:is4linklocal</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is an IPv4 link local (Zeroconf) address - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("169.254.34.125") -if addr:is4linklocal() then - print("Is a zeroconf address") -end</pre> - - - -<h3>Return value:</h3> -<code>true</code> if the entire range of this CIDR lies within the range - the range <code>169.254.0.0-169.254.255.255</code>, else <code>false</code>. - - - -</dd> - - - - -<dt><a name="cidr.is6"></a><strong>cidr:is6</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is an IPv6 address range - - - - - - - - -<h3>Return value:</h3> -<code>true</code> if the CIDR is an IPv6 range, else <code>false</code> - - - -<h3>See also:</h3> -<ul> - - <li><a href="#cidr.is4"> - cidr:is4 - </a> - - <li><a href="#cidr.ismac"> - cidr:ismac - </a> - -</ul> - -</dd> - - - - -<dt><a name="cidr.is6linklocal"></a><strong>cidr:is6linklocal</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is an IPv6 link local address - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("fe92:53a:3216:af01:221:63ff:fe75:aa17/64") -if addr:is6linklocal() then - print("Is a linklocal address") -end</pre> - - - -<h3>Return value:</h3> -<code>true</code> if the entire range of this CIDR lies within the range - the <code>fe80::/10</code> range, else <code>false</code>. - - - -</dd> - - - - -<dt><a name="cidr.is6mapped4"></a><strong>cidr:is6mapped4</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is an IPv6 mapped IPv4 address - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("::ffff:192.168.1.1") -if addr:is6mapped4() then - print("Is a mapped IPv4 address") -end</pre> - - - -<h3>Return value:</h3> -<code>true</code> if the address is an IPv6 mapped IPv4 address in the - form <code>::ffff:1.2.3.4</code>. - - - -</dd> - - - - -<dt><a name="cidr.ismac"></a><strong>cidr:ismac</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is an ethernet MAC address range - - - - - - - - -<h3>Return value:</h3> -<code>true</code> if the CIDR is a MAC address range, else <code>false</code> - - - -<h3>See also:</h3> -<ul> - - <li><a href="#cidr.is4"> - cidr:is4 - </a> - - <li><a href="#cidr.is6"> - cidr:is6 - </a> - -</ul> - -</dd> - - - - -<dt><a name="cidr.ismaclocal"></a><strong>cidr:ismaclocal</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is a locally administered (LAA) MAC address - - - - - - -<h3>Usage:</h3> -<pre>local mac = luci.ip.new("02:C0:FF:EE:00:01") -if mac:ismaclocal() then - print("Is an LAA MAC address") -end</pre> - - - -<h3>Return value:</h3> -<code>true</code> if the MAC address sets the locally administered bit. - - - -</dd> - - - - -<dt><a name="cidr.ismacmcast"></a><strong>cidr:ismacmcast</strong> ()</dt> -<dd> - - -Checks whether the CIDR instance is a multicast MAC address - - - - - - -<h3>Usage:</h3> -<pre>local mac = luci.ip.new("01:00:5E:7F:00:10") -if addr:ismacmcast() then - print("Is a multicast MAC address") -end</pre> - - - -<h3>Return value:</h3> -<code>true</code> if the MAC address sets the multicast bit. - - - -</dd> - - - - -<dt><a name="cidr.lower"></a><strong>cidr:lower</strong> (addr)</dt> -<dd> - - -Checks whether this CIDR instance is lower than the given argument. -The comparisation follows these rules: -<ul><li>An IPv4 address is always lower than an IPv6 address and IPv6 addresses -are considered lower than MAC addresses</li> -<li>Prefix sizes are ignored</li></ul> - - - -<h3>Parameters</h3> -<ul> - - <li> - addr: A <code>luci.ip.cidr</code> instance or a string convertible by - <code>luci.ip.new()</code> to compare against. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.1.1") -print(addr:lower(addr)) -- false -print(addr:lower("10.10.10.10/24")) -- false -print(addr:lower(luci.ip.new("::1"))) -- true -print(addr:lower(luci.ip.new("192.168.200.1"))) -- true -print(addr:lower(luci.ip.new("00:14:22:01:23:45"))) -- true</pre> - - - -<h3>Return value:</h3> -<code>true</code> if this CIDR is lower than the given address, - else <code>false</code>. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#cidr.higher"> - cidr:higher - </a> - - <li><a href="#cidr.equal"> - cidr:equal - </a> - -</ul> - -</dd> - - - - -<dt><a name="cidr.higher"></a><strong>cidr:higher</strong> (addr)</dt> -<dd> - - -Checks whether this CIDR instance is higher than the given argument. -The comparisation follows these rules: -<ul><li>An IPv4 address is always lower than an IPv6 address and IPv6 addresses -are considered lower than MAC addresses</li> -<li>Prefix sizes are ignored</li></ul> - - - -<h3>Parameters</h3> -<ul> - - <li> - addr: A <code>luci.ip.cidr</code> instance or a string convertible by - <code>luci.ip.new()</code> to compare against. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.1.1") -print(addr:higher(addr)) -- false -print(addr:higher("10.10.10.10/24")) -- true -print(addr:higher(luci.ip.new("::1"))) -- false -print(addr:higher(luci.ip.new("192.168.200.1"))) -- false -print(addr:higher(luci.ip.new("00:14:22:01:23:45"))) -- false</pre> - - - -<h3>Return value:</h3> -<code>true</code> if this CIDR is higher than the given address, - else <code>false</code>. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#cidr.lower"> - cidr:lower - </a> - - <li><a href="#cidr.equal"> - cidr:equal - </a> - -</ul> - -</dd> - - - - -<dt><a name="cidr.equal"></a><strong>cidr:equal</strong> (addr)</dt> -<dd> - - -Checks whether this CIDR instance is equal to the given argument. - - - -<h3>Parameters</h3> -<ul> - - <li> - addr: A <code>luci.ip.cidr</code> instance or a string convertible by - <code>luci.ip.new()</code> to compare against. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.1.1") -print(addr:equal(addr)) -- true -print(addr:equal("192.168.1.1")) -- true -print(addr:equal(luci.ip.new("::1"))) -- false - -local addr6 = luci.ip.new("::1") -print(addr6:equal("0:0:0:0:0:0:0:1/64")) -- true -print(addr6:equal(luci.ip.new("fe80::221:63ff:fe75:aa17"))) -- false - -local mac = luci.ip.new("00:14:22:01:23:45") -print(mac:equal("0:14:22:1:23:45")) -- true -print(mac:equal(luci.ip.new("01:23:45:67:89:AB")) -- false</pre> - - - -<h3>Return value:</h3> -<code>true</code> if this CIDR is equal to the given address, - else <code>false</code>. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#cidr.lower"> - cidr:lower - </a> - - <li><a href="#cidr.higher"> - cidr:higher - </a> - -</ul> - -</dd> - - - - -<dt><a name="cidr.prefix"></a><strong>cidr:prefix</strong> (mask)</dt> -<dd> - - -Get or set prefix size of CIDR instance. -If the optional mask parameter is given, the prefix size of this CIDR is altered -else the current prefix size is returned. - - - -<h3>Parameters</h3> -<ul> - - <li> - mask: Either a number containing the number of bits (<code>0..32</code> - for IPv4, <code>0..128</code> for IPv6 or <code>0..48</code> for MAC addresses) or a string - containing a valid netmask (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local range = luci.ip.new("192.168.1.1/255.255.255.0") -print(range:prefix()) -- 24 - -range:prefix(16) -print(range:prefix()) -- 16 - -range:prefix("255.255.255.255") -print(range:prefix()) -- 32</pre> - - - -<h3>Return value:</h3> -Bit count of the current prefix size - - - -</dd> - - - - -<dt><a name="cidr.network"></a><strong>cidr:network</strong> (mask)</dt> -<dd> - - -Derive network address of CIDR instance. - -Returns a new CIDR instance representing the network address of this instance -with all host parts masked out. The used prefix size can be overridden by the -optional mask parameter. - - - -<h3>Parameters</h3> -<ul> - - <li> - mask: Either a number containing the number of bits (<code>0..32</code> - for IPv4, <code>0..128</code> for IPv6 or <code>0..48</code> for MAC addresses) or a string - containing a valid netmask (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local range = luci.ip.new("192.168.62.243/255.255.0.0") -print(range:network()) -- "192.168.0.0" -print(range:network(24)) -- "192.168.62.0" -print(range:network("255.255.255.0")) -- "192.168.62.0" - -local range6 = luci.ip.new("fd9b:62b3:9cc5:0:221:63ff:fe75:aa17/64") -print(range6:network()) -- "fd9b:62b3:9cc5::"</pre> - - - -<h3>Return value:</h3> -CIDR instance representing the network address - - - -</dd> - - - - -<dt><a name="cidr.host"></a><strong>cidr:host</strong> ()</dt> -<dd> - - -Derive host address of CIDR instance. - -This function essentially constructs a copy of this CIDR with the prefix size -set to <code>32</code> for IPv4, <code>128</code> for IPv6 or <code>48</code> for MAC addresses. - - - - - - -<h3>Usage:</h3> -<pre>local range = luci.ip.new("172.19.37.45/16") -print(range) -- "172.19.37.45/16" -print(range:host()) -- "172.19.37.45"</pre> - - - -<h3>Return value:</h3> -CIDR instance representing the host address - - - -</dd> - - - - -<dt><a name="cidr.mask"></a><strong>cidr:mask</strong> (mask)</dt> -<dd> - - -Derive netmask of CIDR instance. - -Constructs a CIDR instance representing the netmask of this instance. The used -prefix size can be overridden by the optional mask parameter. - - - -<h3>Parameters</h3> -<ul> - - <li> - mask: Either a number containing the number of bits (<code>0..32</code> - for IPv4, <code>0..128</code> for IPv6 or <code>0..48</code> for MAC addresses) or a string - containing a valid netmask (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local range = luci.ip.new("172.19.37.45/16") -print(range:mask()) -- "255.255.0.0" -print(range:mask(24)) -- "255.255.255.0" -print(range:mask("255.0.0.0")) -- "255.0.0.0"</pre> - - - -<h3>Return value:</h3> -CIDR instance representing the netmask - - - -</dd> - - - - -<dt><a name="cidr.broadcast"></a><strong>cidr:broadcast</strong> (mask)</dt> -<dd> - - -Derive broadcast address of CIDR instance. - -Constructs a CIDR instance representing the broadcast address of this instance. -The used prefix size can be overridden by the optional mask parameter. - -This function has no effect on IPv6 or MAC address instances, it will return -nothing in this case. - - - -<h3>Parameters</h3> -<ul> - - <li> - mask: Either a number containing the number of bits (<code>0..32</code> for IPv4) or - a string containing a valid netmask (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local range = luci.ip.new("172.19.37.45/16") -print(range:broadcast()) -- "172.19.255.255" -print(range:broadcast(24)) -- "172.19.37.255" -print(range:broadcast("255.0.0.0")) -- "172.255.255.255"</pre> - - - -<h3>Return value:</h3> -Return a new CIDR instance representing the broadcast address if this - instance is an IPv4 range, else return nothing. - - - -</dd> - - - - -<dt><a name="cidr.mapped4"></a><strong>cidr:mapped4</strong> ()</dt> -<dd> - - -Derive mapped IPv4 address of CIDR instance. - -Constructs a CIDR instance representing the IPv4 address of the IPv6 mapped -IPv4 address in this instance. - -This function has no effect on IPv4 instances, MAC address instances or IPv6 -instances which are not a mapped address, it will return nothing in this case. - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("::ffff:172.16.19.1") -print(addr:mapped4()) -- "172.16.19.1"</pre> - - - -<h3>Return value:</h3> -Return a new CIDR instance representing the IPv4 address if this - instance is an IPv6 mapped IPv4 address, else return nothing. - - - -</dd> - - - - -<dt><a name="cidr.tomac"></a><strong>cidr:tomac</strong> ()</dt> -<dd> - - -Derive MAC address of IPv6 link local CIDR instance. - -Constructs a CIDR instance representing the MAC address contained in the IPv6 -link local address of this instance. - -This function has no effect on IPv4 instances, MAC address instances or IPv6 -instances which are not a link local address, it will return nothing in this -case. - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("fe80::6666:b3ff:fe47:e1b9") -print(addr:tomac()) -- "64:66:B3:47:E1:B9"</pre> - - - -<h3>Return value:</h3> -Return a new CIDR instance representing the MAC address if this - instance is an IPv6 link local address, else return nothing. - - - -</dd> - - - - -<dt><a name="cidr.tolinklocal"></a><strong>cidr:tolinklocal</strong> ()</dt> -<dd> - - -Derive IPv6 link local address from MAC address CIDR instance. - -Constructs a CIDR instance representing the IPv6 link local address of the -MAC address represented by this instance. - -This function has no effect on IPv4 instances or IPv6 instances, it will return -nothing in this case. - - - - - - -<h3>Usage:</h3> -<pre>local mac = luci.ip.new("64:66:B3:47:E1:B9") -print(mac:tolinklocal()) -- "fe80::6666:b3ff:fe47:e1b9"</pre> - - - -<h3>Return value:</h3> -Return a new CIDR instance representing the IPv6 link local address. - - - -</dd> - - - - -<dt><a name="cidr.contains"></a><strong>cidr:contains</strong> (addr)</dt> -<dd> - - -Test whether CIDR contains given range. - - - -<h3>Parameters</h3> -<ul> - - <li> - addr: A <code>luci.ip.cidr</code> instance or a string convertible by - <code>luci.ip.new()</code> to test. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local range = luci.ip.new("10.24.0.0/255.255.0.0") -print(range:contains("10.24.5.1")) -- true -print(range:contains("::1")) -- false -print(range:contains("10.0.0.0/8")) -- false - -local range6 = luci.ip.new("fe80::/10") -print(range6:contains("fe80::221:63f:fe75:aa17/64")) -- true -print(range6:contains("fd9b:6b3:c5:0:221:63f:fe75:aa17/64")) -- false - -local intel_macs = luci.ip.MAC("C0:B6:F9:00:00:00/24") -print(intel_macs:contains("C0:B6:F9:A3:C:11")) -- true -print(intel_macs:contains("64:66:B3:47:E1:B9")) -- false</pre> - - - -<h3>Return value:</h3> -<code>true</code> if this instance fully contains the given address else - <code>false</code>. - - - -</dd> - - - - -<dt><a name="cidr.add"></a><strong>cidr:add</strong> (amount, inplace)</dt> -<dd> - - -Add given amount to CIDR instance. If the result would overflow the maximum -address space, the result is set to the highest possible address. - - - -<h3>Parameters</h3> -<ul> - - <li> - amount: A numeric value between 0 and 0xFFFFFFFF, a - <code>luci.ip.cidr</code> instance or a string convertible by - <code>luci.ip.new()</code>. - </li> - - <li> - inplace: If <code>true</code>, modify this instance instead of returning - a new derived CIDR instance. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.1.1/24") -print(addr:add(250)) -- "192.168.1.251/24" -print(addr:add("0.0.99.0")) -- "192.168.100.1/24" - -addr:add(256, true) -- true -print(addr) -- "192.168.2.1/24 - -addr:add("255.0.0.0", true) -- false (overflow) -print(addr) -- "255.255.255.255/24 - -local addr6 = luci.ip.new("fe80::221:63f:fe75:aa17/64") -print(addr6:add(256)) -- "fe80::221:63f:fe75:ab17/64" -print(addr6:add("::ffff:0")) -- "fe80::221:640:fe74:aa17/64" - -addr6:add(256, true) -- true -print(addr6) -- "fe80::221:63f:fe75:ab17/64 - -addr6:add("ffff::", true) -- false (overflow) -print(addr6) -- "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/64" - -local mac = luci.ip.new("00:14:22:01:23:45") -print(mac:add(256)) -- "00:14:22:01:24:45" -print(mac:add("0:0:0:0:FF:0") -- "00:14:22:02:22:45" - -mac:add(256, true) -- true -print(mac) -- "00:14:22:01:24:45" - -mac:add("FF:FF:0:0:0:0", true) -- false (overflow) -print(mac) -- "FF:FF:FF:FF:FF:FF"</pre> - - - -<h3>Return value:</h3> -<ul> - <li>When adding inplace: Return <code>true</code> if the addition succeeded - or <code>false</code> when the addition overflowed.</li> - <li>When deriving new CIDR: Return new instance representing the value of - this instance plus the added amount or the highest possible address if - the addition overflowed the available address space.</li></ul> - - - -</dd> - - - - -<dt><a name="cidr.sub"></a><strong>cidr:sub</strong> (amount, inplace)</dt> -<dd> - - -Subtract given amount from CIDR instance. If the result would under, the lowest -possible address is returned. - - - -<h3>Parameters</h3> -<ul> - - <li> - amount: A numeric value between 0 and 0xFFFFFFFF, a - <code>luci.ip.cidr</code> instance or a string convertible by - <code>luci.ip.new()</code>. - </li> - - <li> - inplace: If <code>true</code>, modify this instance instead of returning - a new derived CIDR instance. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.1.1/24") -print(addr:sub(256)) -- "192.168.0.1/24" -print(addr:sub("0.168.0.0")) -- "192.0.1.1/24" - -addr:sub(256, true) -- true -print(addr) -- "192.168.0.1/24 - -addr:sub("255.0.0.0", true) -- false (underflow) -print(addr) -- "0.0.0.0/24 - -local addr6 = luci.ip.new("fe80::221:63f:fe75:aa17/64") -print(addr6:sub(256)) -- "fe80::221:63f:fe75:a917/64" -print(addr6:sub("::ffff:0")) -- "fe80::221:63e:fe76:aa17/64" - -addr:sub(256, true) -- true -print(addr) -- "fe80::221:63f:fe75:a917/64" - -addr:sub("ffff::", true) -- false (underflow) -print(addr) -- "::/64" - -local mac = luci.ip.new("00:14:22:01:23:45") -print(mac:sub(256)) -- "00:14:22:01:22:45" -print(mac:sub("0:0:0:0:FF:0") -- "00:14:22:00:24:45" - -mac:sub(256, true) -- true -print(mac) -- "00:14:22:01:22:45" - -mac:sub("FF:FF:0:0:0:0", true) -- false (overflow) -print(mac) -- "00:00:00:00:00:00"</pre> - - - -<h3>Return value:</h3> -<ul> - <li>When subtracting inplace: Return <code>true</code> if the subtraction - succeeded or <code>false</code> when the subtraction underflowed.</li> - <li>When deriving new CIDR: Return new instance representing the value of - this instance minus the subtracted amount or the lowest address if - the subtraction underflowed.</li></ul> - - - -</dd> - - - - -<dt><a name="cidr.minhost"></a><strong>cidr:minhost</strong> ()</dt> -<dd> - - -Calculate the lowest possible host address within this CIDR instance. - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.123.56/24") -print(addr:minhost()) -- "192.168.123.1" - -local addr6 = luci.ip.new("fd9b:62b3:9cc5:0:221:63ff:fe75:aa17/64") -print(addr6:minhost()) -- "fd9b:62b3:9cc5::1" - -local mac = luci.ip.new("00:14:22:01:22:45/32") -print(mac:minhost()) -- "00:14:22:01:00:01"</pre> - - - -<h3>Return value:</h3> -Returns a new CIDR instance representing the lowest host address - within this range. - - - -</dd> - - - - -<dt><a name="cidr.maxhost"></a><strong>cidr:maxhost</strong> ()</dt> -<dd> - - -Calculate the highest possible host address within this CIDR instance. - - - - - - -<h3>Usage:</h3> -<pre>local addr = luci.ip.new("192.168.123.56/24") -print(addr:maxhost()) -- "192.168.123.254" (.255 is broadcast) - -local addr6 = luci.ip.new("fd9b:62b3:9cc5:0:221:63ff:fe75:aa17/64") -print(addr6:maxhost()) -- "fd9b:62b3:9cc5:0:ffff:ffff:ffff:ffff" - -local mac = luci.ip.new("00:14:22:01:22:45/32") -print(mac:maxhost()) -- "00:14:22:01:FF:FF"</pre> - - - -<h3>Return value:</h3> -Returns a new CIDR instance representing the highest host address - within this range. - - - -</dd> - - - - -<dt><a name="cidr.string"></a><strong>cidr:string</strong> ()</dt> -<dd> - - -Convert CIDR instance into string representation. - -If the prefix size of instance is less than 32 for IPv4, 128 for IPv6 or 48 for -MACs, the address is returned in the form "address/prefix" otherwise just -"address". - -It is usually not required to call this function directly as CIDR objects -define it as __tostring function in the associated metatable. - - - - - - - - -<h3>Return value:</h3> -Returns a string representing the range or address of this CIDR instance - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.ip.html b/documentation/api/modules/luci.ip.html deleted file mode 100644 index 0599396b6f..0000000000 --- a/documentation/api/modules/luci.ip.html +++ /dev/null @@ -1,1217 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li><strong>luci.ip</strong></li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.ip</code></h1> - -<p> - LuCI IP calculation and netlink access library.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#new">new</a> (address, netmask)</td> - <td class="summary"> - -Construct a new luci.ip.cidr instance and autodetect the address family.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IPv4">IPv4</a> (address, netmask)</td> - <td class="summary"> - -Construct a new IPv4 luci.ip.cidr instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IPv6">IPv6</a> (address, netmask)</td> - <td class="summary"> - -Construct a new IPv6 luci.ip.cidr instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#MAC">MAC</a> (address, netmask)</td> - <td class="summary"> - -Construct a new MAC luci.ip.cidr instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#checkip4">checkip4</a> (address)</td> - <td class="summary"> - -Verify an IPv4 address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#checkip6">checkip6</a> (address)</td> - <td class="summary"> - -Verify an IPv6 address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#checkmac">checkmac</a> (address)</td> - <td class="summary"> - -Verify an ethernet MAC address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#route">route</a> (address, source)</td> - <td class="summary"> - -Determine the route leading to the given destination.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#routes">routes</a> (filter, callback)</td> - <td class="summary"> - -Fetch all routes, optionally matching the given criteria.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#neighbors">neighbors</a> (filter, callback)</td> - <td class="summary"> - -Fetches entries from the IPv4 ARP and IPv6 neighbour kernel table </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#link">link</a> (device)</td> - <td class="summary"> - -Fetch basic device information </td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="new"></a><strong>new</strong> (address, netmask)</dt> -<dd> - - -Construct a new luci.ip.cidr instance and autodetect the address family. -Throws an error if the given strings do not represent a valid address or -if the given optional netmask is of a different family. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid IPv4 or IPv6 address, optionally -with prefix size (CIDR notation) or netmask separated by slash. - </li> - - <li> - netmask: String containing a valid IPv4 or IPv6 netmask or number -containing a prefix size in bits (<code>0..32</code> for IPv4, -<code>0..128</code> for IPv6). Overrides mask embedded in the first argument -if specified. (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>addr = luci.ip.new("10.24.0.1/24") -addr = luci.ip.new("10.24.0.1/255.255.255.0") -addr = luci.ip.new("10.24.0.1", "255.255.255.0") -- separate netmask -addr = luci.ip.new("10.24.0.1/24", 16) -- override netmask - -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/64") -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/ffff:ffff:ffff:ffff::") -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17", "ffff:ffff:ffff:ffff::") -addr6 = luci.ip.new("fe80::221:63ff:fe75:aa17/64", 128) -- override netmask</pre> - - - -<h3>Return value:</h3> -A <code>luci.ip.cidr</code> object representing the given -address/mask range. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#IPv4"> - IPv4 - </a> - - <li><a href="#IPv6"> - IPv6 - </a> - - <li><a href="#MAC"> - MAC - </a> - -</ul> - -</dd> - - - - -<dt><a name="IPv4"></a><strong>IPv4</strong> (address, netmask)</dt> -<dd> - - -Construct a new IPv4 luci.ip.cidr instance. -Throws an error if the given string does not represent a valid IPv4 address or -if the given optional netmask is of a different family. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid IPv4, optionally with prefix size -(CIDR notation) or netmask separated by slash. - </li> - - <li> - netmask: String containing a valid IPv4 netmask or number -containing a prefix size between <code>0</code> and <code>32</code> bit. -Overrides mask embedded in the first argument if specified. (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>addr = luci.ip.IPv4("10.24.0.1/24") -addr = luci.ip.IPv4("10.24.0.1/255.255.255.0") -addr = luci.ip.IPv4("10.24.0.1", "255.255.255.0") -- separate netmask -addr = luci.ip.IPv4("10.24.0.1/24", 16) -- override netmask</pre> - - - -<h3>Return value:</h3> -A <code>luci.ip.cidr</code> object representing the given IPv4 range. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#IPv6"> - IPv6 - </a> - - <li><a href="#MAC"> - MAC - </a> - -</ul> - -</dd> - - - - -<dt><a name="IPv6"></a><strong>IPv6</strong> (address, netmask)</dt> -<dd> - - -Construct a new IPv6 luci.ip.cidr instance. -Throws an error if the given string does not represent a valid IPv6 address or -if the given optional netmask is of a different family. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid IPv6, optionally with prefix size -(CIDR notation) or netmask separated by slash. - </li> - - <li> - netmask: String containing a valid IPv4 netmask or number -containing a prefix size between <code>0</code> and <code>128</code> bit. -Overrides mask embedded in the first argument if specified. (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/64") -addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/ffff:ffff:ffff:ffff::") -addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17", "ffff:ffff:ffff:ffff::") -addr6 = luci.ip.IPv6("fe80::221:63ff:fe75:aa17/64", 128) -- override netmask</pre> - - - -<h3>Return value:</h3> -A <code>luci.ip.cidr</code> object representing the given IPv6 range. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#IPv4"> - IPv4 - </a> - - <li><a href="#MAC"> - MAC - </a> - -</ul> - -</dd> - - - - -<dt><a name="MAC"></a><strong>MAC</strong> (address, netmask)</dt> -<dd> - - -Construct a new MAC luci.ip.cidr instance. -Throws an error if the given string does not represent a valid ethernet MAC -address or if the given optional mask is of a different family. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid ethernet MAC address, optionally with -prefix size (CIDR notation) or mask separated by slash. - </li> - - <li> - netmask: String containing a valid MAC address mask or number -containing a prefix size between <code>0</code> and <code>48</code> bit. -Overrides mask embedded in the first argument if specified. (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>intel_macs = luci.ip.MAC("C0:B6:F9:00:00:00/24") -intel_macs = luci.ip.MAC("C0:B6:F9:00:00:00/FF:FF:FF:0:0:0") -intel_macs = luci.ip.MAC("C0:B6:F9:00:00:00", "FF:FF:FF:0:0:0") -intel_macs = luci.ip.MAC("C0:B6:F9:00:00:00/24", 48) -- override mask</pre> - - - -<h3>Return value:</h3> -A <code>luci.ip.cidr</code> object representing the given MAC address range. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#IPv4"> - IPv4 - </a> - - <li><a href="#IPv6"> - IPv6 - </a> - -</ul> - -</dd> - - - - -<dt><a name="checkip4"></a><strong>checkip4</strong> (address)</dt> -<dd> - - -Verify an IPv4 address. - -Checks whether given argument is a preexisting luci.ip.cidr IPv4 address -instance or a string literal convertible to an IPv4 address and returns a -plain Lua string containing the canonical representation of the address. - -If the argument is not a valid address, returns nothing. This function is -intended to aid in safely verifying address literals without having to deal -with exceptions. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid IPv4 address or existing -luci.ip.cidr IPv4 instance. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>ipv4 = luci.ip.checkip4(luci.ip.new("127.0.0.1")) -- "127.0.0.1" -ipv4 = luci.ip.checkip4("127.0.0.1") -- "127.0.0.1" -ipv4 = luci.ip.checkip4("nonesense") -- nothing -ipv4 = luci.ip.checkip4(123) -- nothing -ipv4 = luci.ip.checkip4(nil) -- nothing -ipv4 = luci.ip.checkip4() -- nothing</pre> - - - -<h3>Return value:</h3> -A string representing the given IPv4 address. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#checkip6"> - checkip6 - </a> - - <li><a href="#checkmac"> - checkmac - </a> - -</ul> - -</dd> - - - - -<dt><a name="checkip6"></a><strong>checkip6</strong> (address)</dt> -<dd> - - -Verify an IPv6 address. - -Checks whether given argument is a preexisting luci.ip.cidr IPv6 address -instance or a string literal convertible to an IPv6 address and returns a -plain Lua string containing the canonical representation of the address. - -If the argument is not a valid address, returns nothing. This function is -intended to aid in safely verifying address literals without having to deal -with exceptions. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid IPv6 address or existing -luci.ip.cidr IPv6 instance. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>ipv6 = luci.ip.checkip6(luci.ip.new("0:0:0:0:0:0:0:1")) -- "::1" -ipv6 = luci.ip.checkip6("0:0:0:0:0:0:0:1") -- "::1" -ipv6 = luci.ip.checkip6("nonesense") -- nothing -ipv6 = luci.ip.checkip6(123) -- nothing -ipv6 = luci.ip.checkip6(nil) -- nothing -ipv6 = luci.ip.checkip6() -- nothing</pre> - - - -<h3>Return value:</h3> -A string representing the given IPv6 address. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#checkip4"> - checkip4 - </a> - - <li><a href="#checkmac"> - checkmac - </a> - -</ul> - -</dd> - - - - -<dt><a name="checkmac"></a><strong>checkmac</strong> (address)</dt> -<dd> - - -Verify an ethernet MAC address. - -Checks whether given argument is a preexisting luci.ip.cidr MAC address -instance or a string literal convertible to an ethernet MAC and returns a -plain Lua string containing the canonical representation of the address. - -If the argument is not a valid address, returns nothing. This function is -intended to aid in safely verifying address literals without having to deal -with exceptions. - - -<h3>Parameters</h3> -<ul> - - <li> - address: String containing a valid MAC address or existing luci.ip.cidr -MAC address instance. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>mac = luci.ip.checkmac(luci.ip.new("00-11-22-cc-dd-ee")) -- "00:11:22:CC:DD:EE" -mac = luci.ip.checkmac("00:11:22:cc:dd:ee") -- "00:11:22:CC:DD:EE" -mac = luci.ip.checkmac("nonesense") -- nothing -mac = luci.ip.checkmac(123) -- nothing -mac = luci.ip.checkmac(nil) -- nothing -mac = luci.ip.checkmac() -- nothing</pre> - - - -<h3>Return value:</h3> -A string representing the given MAC address. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#checkip4"> - checkip4 - </a> - - <li><a href="#checkip6"> - checkip6 - </a> - -</ul> - -</dd> - - - - -<dt><a name="route"></a><strong>route</strong> (address, source)</dt> -<dd> - - -Determine the route leading to the given destination. - - -<h3>Parameters</h3> -<ul> - - <li> - address: A <code>luci.ip.cidr</code> instance or a string containing -a valid IPv4 or IPv6 range as specified by <code>luci.ip.new()</code>. - </li> - - <li> - source: A <code>luci.ip.cidr</code> instance or a string containing -the preferred source address for route selection (optional). - </li> - -</ul> - - - - -<h3>Usage:</h3> -<ul> -<li>Find default gateway by getting route to Google's public NS server -<pre>rt = luci.ip.route("8.8.8.8") -if rt ~= nil then - print("gateway is", rt.gw) -end</pre></li> -<li>Determine IPv6 upstream interface <pre>rt = luci.ip.route("2001::/7") -if rt ~= nil then - print("ipv6 upstream device is", rt.dev) -end</pre></li> -</ul> - - - -<h3>Return value:</h3> -<p>Table containing the fields described below.</p> -<table id="routetable"> -<tr><th>Field</th><th>Description</th></tr> -<tr><td><code>type</code><td> - <p>Route type with one of the following numeric values:</p> - <table> - <tr> - <td><code>1</code></td> - <td><code>RTN_UNICAST</code> - Gateway or direct route</td> - </tr> - <tr> - <td><code>2</code></td> - <td><code>RTN_LOCAL</code> - Accept locally</td> - </tr> - <tr> - <td><code>3</code></td> - <td><code>RTN_BROADCAST</code> - - Accept locally as broadcast send as broadcast</td> - </tr> - <tr> - <td><code>4</code></td> - <td><code>RTN_ANYCAST</code> - - Accept locally as broadcast but send as unicast</td> - </tr> - <tr> - <td><code>5</code></td> - <td><code>RTN_MULTICAST</code> - Multicast route</td> - </tr> - </table> -</td></tr> -<tr> - <td><code>family</code></td> - <td>Number containing the route family, <code>4</code> for IPv4 or - <code>6</code> for IPv6</td> -</tr> -<tr> - <td><code>dest</code></td> - <td>Destination <code>luci.ip.cidr</code> instance</td> -</tr> -<tr> - <td><code>gw</code></td> - <td>Gateway <code>luci.ip.cidr</code> instance (optional)</td> -</tr> -<tr> - <td><code>from</code></td> - <td>Source address <code>luci.ip.cidr</code> instance (optional)</td> -</tr> -<tr> - <td><code>src</code></td> - <td>Preferred source <code>luci.ip.cidr</code> instance (optional)</td> -</tr> -<tr> - <td><code>dev</code></td> - <td>String containing the name of the outgoing interface</td> -</tr> -<tr> - <td><code>iif</code></td> - <td>String containing the name of the incoming interface (optional)</td> -</tr> -<tr> - <td><code>table</code></td> - <td>Number of the associated routing table (<code>0..65535</code>)</td> -</tr> -<tr> - <td><code>proto</code></td> - <td>Number of the associated routing protocol</td> -</tr> -<tr> - <td><code>scope</code></td> - <td>Number describing the scope of the route, most commonly - <code>0</code> for global or <code>253</code> for on-link</td> -</tr> -<tr> - <td><code>metric</code></td> - <td>Number describing the route metric (optional)</td> -</tr> -<tr> - <td><code>expires</code></td> - <td>Number of seconds the prefix is valid (IPv6 only, optional)</td> -</tr> -<tr> - <td><code>error</code></td> - <td>Route destination error code (optional)</td> -</tr> -</table> - - - -<h3>See also:</h3> -<ul> - - <li><a href="#routes"> - routes - </a> - -</ul> - -</dd> - - - - -<dt><a name="routes"></a><strong>routes</strong> (filter, callback)</dt> -<dd> - - -Fetch all routes, optionally matching the given criteria. - - -<h3>Parameters</h3> -<ul> - - <li> - filter: <p>Table containing one or more of the possible filter -criteria described below (optional)</p><table> -<tr><th>Field</th><th>Description</th></tr> -<tr><td><code>family</code></td><td> - Number describing the address family to return - <code>4</code> selects - IPv4 routes, <code>6</code> IPv6 ones. Any other value selects both. -</td></tr> -<tr><td><code>iif</code></td><td> - String containing the incoming route interface to match. -</td></tr> -<tr><td><code>oif</code></td><td> - String containing the outgoing route interface to match. -</td></tr> -<tr><td><code>type</code></td><td> - Numeric type to match, e.g. <code>1</code> for unicast. -</td></tr> -<tr><td><code>scope</code></td><td> - Numeric scope to match, e.g. <code>253</code> for onlink. -</td></tr> -<tr><td><code>proto</code></td><td> - Numeric protocol to match, e.g. <code>2</code> for boot. -</td></tr> -<tr><td><code>table</code></td><td> - Numeric routing table to match (<code>0..65535</code>). -</td></tr> -<tr><td><code>gw</code></td><td> - String containing the gateway address to match. Can be in any notation - specified by <code>luci.ip.new()</code>. Prefix matching is performed when - comparing the routes, e.g. "192.168.1.0/24" would select routes with gateway - addresses <code>192.168.1.1 .. 192.168.1.255</code>. -</td></tr> -<tr><td><code>dest</code></td><td> - String containing the destination to match. Prefix matching is performed. -</td></tr> -<tr><td><code>from</code></td><td> - String containing the source address to match. Prefix matching is performed. -</td></tr> -<tr><td><code>src</code></td><td> - String containing the preferred source address to match. - Prefix matching is performed. -</td></tr> -<tr><td><code>dest_exact</code></td><td> - String containing the destination to match. Exact matching is performed, - e.g. <code>dest = "0.0.0.0/0"</code> would match <em>any</em> IPv4 route - while <code>dest_exact = "0.0.0.0/0"</code> will <em>only</em> match the - default route. -</td></tr> -<tr><td><code>from_exact</code></td><td> - String containing the source address to match. Exact matching is performed. -</td></tr> -</table> - </li> - - <li> - callback: <p>Callback function to invoke for each found route -instead of returning one table of route objects (optional)</p> - </li> - -</ul> - - - - -<h3>Usage:</h3> -<ul> -<li>Find all IPv4 default routes: -<pre>luci.ip.routes({ dest_exact = "0.0.0.0/0" }, function(rt) - print(rt.type, rt.gw, rt.dev) -end)</pre></li> -<li>Find all global IPv6 prefixes on the current system: -<pre>luci.ip.routes({ from = "2001::/7" }, function(rt) - print(rt.from) -end)</pre></li> -<li>Fetch all IPv4 routes: -<pre>routes = luci.ip.routes({ family = 4 }) -for _, rt in ipairs(routes) do - print(rt.dest, rt.gw, rt.dev) -end</pre></li> -</ul> - - - -<h3>Return value:</h3> -If no callback function is provided, a table of routes -<a href="#routetable">as specified by <code>luci.ip.route()</code></a> -is returned. If a callback function is given, it is invoked for each route -and nothing is returned. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#route"> - route - </a> - -</ul> - -</dd> - - - - -<dt><a name="neighbors"></a><strong>neighbors</strong> (filter, callback)</dt> -<dd> - - -Fetches entries from the IPv4 ARP and IPv6 neighbour kernel table - - -<h3>Parameters</h3> -<ul> - - <li> - filter: <p>Table containing one or more of the possible filter -criteria described below (optional)</p><table> -<tr><th>Field</th><th>Description</th></tr> -<tr><td><code>family</code></td><td> - Number describing the address family to return - <code>4</code> selects - IPv4 ARP, <code>6</code> select IPv6 neighbour entries. Any other value - selects both. -</td></tr> -<tr><td><code>dev</code></td><td> - String containing the associated interface to match. -</td></tr> -<tr><td><code>dest</code></td><td> - String containing the associated address to match. Can be in any notation - specified by <code>luci.ip.new()</code>. Prefix matching is performed when - comparing the addresses, e.g. "192.168.1.0/24" would select ARP entries - for <code>192.168.1.1 .. 192.168.1.255</code>. -</td></tr> -<tr><td><code>mac</code></td><td> - String containing MAC address to match. -</td></tr> -</table> - </li> - - <li> - callback: <p>Callback function to invoke for each found neighbour -entry instead of returning one table of neighbour entries (optional)</p> - </li> - -</ul> - - - - -<h3>Usage:</h3> -<ul> -<li>Find all ARP neighbours in the LAN: -<pre>luci.ip.neighbors({ dest = "192.168.0.0/16" }, function(n) - print(n.dest, n.mac) -end)</pre></li> -<li>Find all active IPv6 addresses of host with given MAC: -<pre>luci.ip.neighbors({ family = 6, mac = "00:21:63:75:aa:17" }, - function(n) - print(n.dest) - end)</pre></li> -</ul> - - - -<h3>Return value:</h3> -If no callback function is provided, a table of neighbour entries -is returned. If a callback function is given, it is invoked for each entry -and nothing is returned. - -A neighbour entry is a table containing the following fields: - -<table> -<tr><th>Field</th><th>Description</th></tr> -<tr> - <td><code>family</code></td> - <td>Number containing the neighbour entry family, <code>4</code> for IPv4 - ARP or <code>6</code> for IPv6 NDP</td> -</tr> -<tr> - <td><code>dev</code></td> - <td>String containing the associated device of the neighbour entry</td> -</tr> -<tr> - <td><code>dest</code></td> - <td>IP address <code>luci.ip.cidr</code> instance</td> -</tr> -<tr> - <td><code>mac</code></td> - <td>MAC address <code>luci.ip.cidr</code> instance</td> -</tr> -<tr> - <td><code>router</code></td> - <td>Boolean "true" if the neighbour entry is a router (IPv6, optional)</td> -</tr> -<tr> - <td><code>proxy</code></td> - <td>Boolean "true" if this is a proxy entry (optional)</td> -</tr> -<tr> - <td><code>incomplete</code></td> - <td>Boolean "true" if the entry is in incomplete state (optional)</td> -</tr> -<tr> - <td><code>reachable</code></td> - <td>Boolean "true" if the entry is in reachable state (optional)</td> -</tr> -<tr> - <td><code>stale</code></td> - <td>Boolean "true" if the entry is stale (optional)</td> -</tr> -<tr> - <td><code>delay</code></td> - <td>Boolean "true" if the entry is delayed (optional)</td> -</tr> -<tr> - <td><code>probe</code></td> - <td>Boolean "true" if the entry is in probe state (optional)</td> -</tr> -<tr> - <td><code>failed</code></td> - <td>Boolean "true" if the entry is in failed state (optional)</td> -</tr> -<tr> - <td><code>noarp</code></td> - <td>Boolean "true" if the entry is not caused by NDP or - ARP (optional)</td> -</tr> -<tr> - <td><code>permanent</code></td> - <td>Boolean "true" if the entry was statically configured from - userspace (optional)</td> -</tr> -</table> - - - -</dd> - - - - -<dt><a name="link"></a><strong>link</strong> (device)</dt> -<dd> - - -Fetch basic device information - - -<h3>Parameters</h3> -<ul> - - <li> - device: String containing the network device to query - </li> - -</ul> - - - - -<h3>Usage:</h3> -<ul> -<li>Test whether device br-lan exists: -<pre>print(luci.ip.link("br-lan").name ~= nil) -</pre></li> -<li>Query MAC address of eth0: -<pre>print(luci.ip.link("eth0").mac) -</pre></li> -</ul> - - - -<h3>Return value:</h3> -If the given interface is found, a table containing the fields -described below is returned, else an empty table. - -<table> -<tr><th>Field</th><th>Description</th></tr> -<tr> - <td><code>up</code></td> - <td>Boolean indicating whether the device is in IFF_RUNNING state</td> -</tr> -<tr> - <td><code>type</code></td> - <td>Numeric value indicating the type of the device, e.g. <code>1</code> - for ethernet.</td> -</tr> -<tr> - <td><code>name</code></td> - <td>String containing the name of the device</td> -</tr> -<tr> - <td><code>master</code></td> - <td>If queried device is a bridge port, string containing the name of - parent bridge device (optional)</td> -</tr> -<tr> - <td><code>mtu</code></td> - <td>Number containing the current MTU of the device</td> -</tr> -<tr> - <td><code>qlen</code></td> - <td>Number containing the TX queue length of the device</td> -</tr> -<tr> - <td><code>mac</code></td> - <td>MAC address <code>luci.ip.cidr</code> instance representing the device ethernet - address</td> -</tr> -</table> - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.json.html b/documentation/api/modules/luci.json.html deleted file mode 100644 index db2d1da3f4..0000000000 --- a/documentation/api/modules/luci.json.html +++ /dev/null @@ -1,594 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li><strong>luci.json</strong></li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.json</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#ActiveDecoder">ActiveDecoder</a> (customnull)</td> - <td class="summary"> - -Create a new Active JSON-Decoder.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#ActiveDecoder.get">ActiveDecoder:get</a> ()</td> - <td class="summary"> - -Fetches one JSON-object from given source - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Decoder">Decoder</a> (customnull)</td> - <td class="summary"> - -Create a new JSON-Decoder.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Decoder.get">Decoder:get</a> ()</td> - <td class="summary"> - -Get the decoded data packets after the rawdata has been sent to the sink.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Decoder.sink">Decoder:sink</a> ()</td> - <td class="summary"> - -Create an LTN12 sink from the decoder object which accepts the JSON-Data.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Encoder">Encoder</a> (data, buffersize, fastescape)</td> - <td class="summary"> - -Create a new JSON-Encoder.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Encoder.source">Encoder:source</a> ()</td> - <td class="summary"> - -Create an LTN12 source providing the encoded JSON-Data.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#decode">decode</a> (json)</td> - <td class="summary"> - -Directly decode a JSON string - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#encode">encode</a> (obj)</td> - <td class="summary"> - -Direcly encode a Lua object into a JSON string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#null">null</a> ()</td> - <td class="summary"> - -Null replacement function - </td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="ActiveDecoder"></a><strong>ActiveDecoder</strong> (customnull)</dt> -<dd> - - -Create a new Active JSON-Decoder. - - - -<h3>Parameters</h3> -<ul> - - <li> - customnull: Use luci.json.null instead of nil for decoding null - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Active JSON-Decoder - - - -</dd> - - - - -<dt><a name="ActiveDecoder.get"></a><strong>ActiveDecoder:get</strong> ()</dt> -<dd> - - -Fetches one JSON-object from given source - - - - - - - - -<h3>Return value:</h3> -Decoded object - - - -</dd> - - - - -<dt><a name="Decoder"></a><strong>Decoder</strong> (customnull)</dt> -<dd> - - -Create a new JSON-Decoder. - - - -<h3>Parameters</h3> -<ul> - - <li> - customnull: Use luci.json.null instead of nil for decoding null - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -JSON-Decoder - - - -</dd> - - - - -<dt><a name="Decoder.get"></a><strong>Decoder:get</strong> ()</dt> -<dd> - - -Get the decoded data packets after the rawdata has been sent to the sink. - - - - - - - - -<h3>Return value:</h3> -Decoded data - - - -</dd> - - - - -<dt><a name="Decoder.sink"></a><strong>Decoder:sink</strong> ()</dt> -<dd> - - -Create an LTN12 sink from the decoder object which accepts the JSON-Data. - - - - - - - - -<h3>Return value:</h3> -LTN12 sink - - - -</dd> - - - - -<dt><a name="Encoder"></a><strong>Encoder</strong> (data, buffersize, fastescape)</dt> -<dd> - - -Create a new JSON-Encoder. - - - -<h3>Parameters</h3> -<ul> - - <li> - data: Lua-Object to be encoded. - </li> - - <li> - buffersize: Blocksize of returned data source. - </li> - - <li> - fastescape: Use non-standard escaping (don't escape control chars) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -JSON-Encoder - - - -</dd> - - - - -<dt><a name="Encoder.source"></a><strong>Encoder:source</strong> ()</dt> -<dd> - - -Create an LTN12 source providing the encoded JSON-Data. - - - - - - - - -<h3>Return value:</h3> -LTN12 source - - - -</dd> - - - - -<dt><a name="decode"></a><strong>decode</strong> (json)</dt> -<dd> - - -Directly decode a JSON string - - - -<h3>Parameters</h3> -<ul> - - <li> - json: JSON-String - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Lua object - - - -</dd> - - - - -<dt><a name="encode"></a><strong>encode</strong> (obj)</dt> -<dd> - - -Direcly encode a Lua object into a JSON string. - - - -<h3>Parameters</h3> -<ul> - - <li> - obj: Lua Object - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -JSON string - - - -</dd> - - - - -<dt><a name="null"></a><strong>null</strong> ()</dt> -<dd> - - -Null replacement function - - - - - - - - -<h3>Return value:</h3> -null - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.jsonc.html b/documentation/api/modules/luci.jsonc.html deleted file mode 100644 index 79deb933d7..0000000000 --- a/documentation/api/modules/luci.jsonc.html +++ /dev/null @@ -1,393 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li><strong>luci.jsonc</strong></li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.jsonc</code></h1> - -<p> - LuCI JSON parsing and serialization library. - The luci.jsonc class is a high level Lua binding to the JSON-C library to - allow reading and writing JSON data with minimal overhead.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#new">new</a> ()</td> - <td class="summary"> - -Construct a new luci.jsonc.parser instance.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parse">parse</a> (json)</td> - <td class="summary"> - -Parse a complete JSON string and convert it into a Lua data structure.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#stringify">stringify</a> (data, pretty)</td> - <td class="summary"> - -Convert given Lua data into a JSON string.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="new"></a><strong>new</strong> ()</dt> -<dd> - - -Construct a new luci.jsonc.parser instance. - - - - - -<h3>Usage:</h3> -<code>parser = luci.jsonc.new()</code> - - - -<h3>Return value:</h3> -A <code>luci.jsonc.parser</code> object representing a JSON-C tokener. - - - -</dd> - - - - -<dt><a name="parse"></a><strong>parse</strong> (json)</dt> -<dd> - - -Parse a complete JSON string and convert it into a Lua data structure. - - -<h3>Parameters</h3> -<ul> - - <li> - json: A string containing the JSON data to parse, must be either a - JSON array or a JSON object. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>data = luci.jsonc.parse('{ "name": "John", "age": 34 }') -print(data.name) -- "John"</pre> - - - -<h3>Return value:</h3> -On success, a table containing the parsed JSON data is returned, on - failure the function returns <code>nil</code> and a string containing the reason of - the parse error. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#stringify"> - stringify - </a> - -</ul> - -</dd> - - - - -<dt><a name="stringify"></a><strong>stringify</strong> (data, pretty)</dt> -<dd> - - -Convert given Lua data into a JSON string. - -This function recursively converts the given Lua data into a JSON string, -ignoring any unsupported data. Lua tables are converted into JSON arrays if they -only contain integer keys, mixed tables are turned into JSON objects with any -existing numeric keys converted into strings. - -Lua functions, coroutines and userdata objects are ignored and Lua numbers are -converted to integers if they do not contain fractional values. - - - -<h3>Parameters</h3> -<ul> - - <li> - data: The Lua data to convert, can be a table, string, boolean or number. - </li> - - <li> - pretty: A boolean value indicating whether the resulting JSON should be - pretty printed. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>json = luci.jsonc.stringify({ item = true, values = { 1, 2, 3 } }) -print(json) -- '{"item":true,"values":[1,2,3]}'</pre> - - - -<h3>Return value:</h3> -Returns a string containing the JSON representation of the given Lua - data. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#parse"> - parse - </a> - -</ul> - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.jsonc.parser.html b/documentation/api/modules/luci.jsonc.parser.html deleted file mode 100644 index 709cb9afc5..0000000000 --- a/documentation/api/modules/luci.jsonc.parser.html +++ /dev/null @@ -1,491 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li><strong>luci.jsonc.parser</strong></li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.jsonc.parser</code></h1> - -<p> - LuCI JSON parser instance. - A JSON parser instance is useful to parse JSON data chunk by chunk, without - the need to assemble all data in advance.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#parser.parse">parser:parse</a> (json)</td> - <td class="summary"> - -Parses one chunk of JSON data.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parser.get">parser:get</a> ()</td> - <td class="summary"> - -Convert parsed JSON data into Lua table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parser.set">parser:set</a> (data)</td> - <td class="summary"> - -Put Lua data into the parser.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parser.sink">parser:sink</a> ()</td> - <td class="summary"> - -Generate an ltn12-compatible sink.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parser.stringify">parser:stringify</a> (pretty)</td> - <td class="summary"> - -Serialize current parser state as JSON.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="parser.parse"></a><strong>parser:parse</strong> (json)</dt> -<dd> - - -Parses one chunk of JSON data. - - - -<h3>Parameters</h3> -<ul> - - <li> - json: String containing the JSON fragment to parse - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>parser = luci.jsonc.new() - -while true do - chunk = ... -- fetch a cunk of data, e.g. from a socket - finish, errmsg = <b>parser.parse(chunk)</b> - - if finish == nil then - error("Cannot parse JSON: " .. errmsg) - end - - if finish == true then - break - end -end</pre> - - - -<h3>Return value:</h3> -<ul> - <li><code>true</code> if a complete JSON object has been parsed and no further input is - expected.</li> - <li><code>false</code> if further input is required</li> - <li><code>nil</code> if an error was encountered while parsing the current chunk. - In this case a string describing the parse error is returned as second - value.</li></ul> - - - -<h3>See also:</h3> -<ul> - - <li><a href="#parser.get"> - parser:get - </a> - -</ul> - -</dd> - - - - -<dt><a name="parser.get"></a><strong>parser:get</strong> ()</dt> -<dd> - - -Convert parsed JSON data into Lua table. - - - - - - -<h3>Usage:</h3> -<pre>parser = luci.jsonc.new() -parser:parse('{ "example": "test" }') - -data = parser:get() -print(data.example) -- "test"</pre> - - - -<h3>Return value:</h3> -Parsed JSON object converted into a Lua table or <code>nil</code> if the parser - didn't finish or encountered an error. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#parser.parse"> - parser:parse - </a> - -</ul> - -</dd> - - - - -<dt><a name="parser.set"></a><strong>parser:set</strong> (data)</dt> -<dd> - - -Put Lua data into the parser. - - - -<h3>Parameters</h3> -<ul> - - <li> - data: Lua data to put into the parser object. The data is converted to an - internal JSON representation that can be dumped with <code>stringify()</code>. - The conversion follows the rules described in <code>luci.jsonc.stringify</code>. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>parser = luci.jsonc.new() -parser:set({ "some", "data" })</pre> - - - -<h3>Return value:</h3> -Nothing is returned. - - - -<h3>See also:</h3> -<ul> - - <li><a href="#parser.stringify"> - parser:stringify - </a> - -</ul> - -</dd> - - - - -<dt><a name="parser.sink"></a><strong>parser:sink</strong> ()</dt> -<dd> - - -Generate an ltn12-compatible sink. - - - - - - -<h3>Usage:</h3> -<pre>parser = luci.jsonc.new() -ltn12.pump.all(ltn12.source.file(io.input()), parser:sink()) -print(parser:get())</pre> - - - -<h3>Return value:</h3> -Returns a function that can be used as an ltn12 sink. - - - -</dd> - - - - -<dt><a name="parser.stringify"></a><strong>parser:stringify</strong> (pretty)</dt> -<dd> - - -Serialize current parser state as JSON. - - - -<h3>Parameters</h3> -<ul> - - <li> - pretty: A boolean value indicating whether the resulting JSON should be pretty printed. - </li> - -</ul> - - - - -<h3>Usage:</h3> -<pre>parser = luci.jsonc.new() -parser:parse('{ "example": "test" }') -print(parser:serialize()) -- '{"example":"test"}'</pre> - - - -<h3>Return value:</h3> -Returns the serialized JSON data of this parser instance. - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.model.ipkg.html b/documentation/api/modules/luci.model.ipkg.html deleted file mode 100644 index a0af3187b7..0000000000 --- a/documentation/api/modules/luci.model.ipkg.html +++ /dev/null @@ -1,730 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li><strong>luci.model.ipkg</strong></li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.model.ipkg</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#compare_versions">compare_versions</a> (ver1, ver2, comp)</td> - <td class="summary"> - -lua version of opkg compare-versions - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#find">find</a> (pat, cb)</td> - <td class="summary"> - -Find packages that match the given pattern.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#info">info</a> (pkg)</td> - <td class="summary"> - -Return information about installed and available packages.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#install">install</a> (...)</td> - <td class="summary"> - -Install one or more packages.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#installed">installed</a> (pkg)</td> - <td class="summary"> - -Determine whether a given package is installed.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#list_all">list_all</a> (pat, cb)</td> - <td class="summary"> - -List all packages known to opkg.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#list_installed">list_installed</a> (pat, cb)</td> - <td class="summary"> - -List installed packages.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#overlay_root">overlay_root</a> ()</td> - <td class="summary"> - -Determines the overlay root used by opkg.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#remove">remove</a> (...)</td> - <td class="summary"> - -Remove one or more packages.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#status">status</a> (pkg)</td> - <td class="summary"> - -Return the package status of one or more packages.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#update">update</a> ()</td> - <td class="summary"> - -Update package lists.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#upgrade">upgrade</a> ()</td> - <td class="summary"> - -Upgrades all installed packages.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="compare_versions"></a><strong>compare_versions</strong> (ver1, ver2, comp)</dt> -<dd> - - -lua version of opkg compare-versions - - - -<h3>Parameters</h3> -<ul> - - <li> - ver1: string version 1 - </li> - - <li> - ver2: string version 2 - </li> - - <li> - comp: string compare versions using - "<=" or "<" lower-equal - ">" or ">=" greater-equal - "=" equal - "<<" lower - ">>" greater - "~=" not equal - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating the status of the compare - - - -</dd> - - - - -<dt><a name="find"></a><strong>find</strong> (pat, cb)</dt> -<dd> - - -Find packages that match the given pattern. - - - -<h3>Parameters</h3> -<ul> - - <li> - pat: Find packages whose names or descriptions match this pattern, nil results in zero results - </li> - - <li> - cb: Callback function invoked for each patckage, receives name, version and description as arguments - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -nothing - - - -</dd> - - - - -<dt><a name="info"></a><strong>info</strong> (pkg)</dt> -<dd> - - -Return information about installed and available packages. - - - -<h3>Parameters</h3> -<ul> - - <li> - pkg: Limit output to a (set of) packages - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing package information - - - -</dd> - - - - -<dt><a name="install"></a><strong>install</strong> (...)</dt> -<dd> - - -Install one or more packages. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: List of packages to install - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating the status of the action - - <li>OPKG return code, STDOUT and STDERR - -</ol> - - - -</dd> - - - - -<dt><a name="installed"></a><strong>installed</strong> (pkg)</dt> -<dd> - - -Determine whether a given package is installed. - - - -<h3>Parameters</h3> -<ul> - - <li> - pkg: Package - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean - - - -</dd> - - - - -<dt><a name="list_all"></a><strong>list_all</strong> (pat, cb)</dt> -<dd> - - -List all packages known to opkg. - - - -<h3>Parameters</h3> -<ul> - - <li> - pat: Only find packages matching this pattern, nil lists all packages - </li> - - <li> - cb: Callback function invoked for each package, receives name, version and description as arguments - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -nothing - - - -</dd> - - - - -<dt><a name="list_installed"></a><strong>list_installed</strong> (pat, cb)</dt> -<dd> - - -List installed packages. - - - -<h3>Parameters</h3> -<ul> - - <li> - pat: Only find packages matching this pattern, nil lists all packages - </li> - - <li> - cb: Callback function invoked for each package, receives name, version and description as arguments - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -nothing - - - -</dd> - - - - -<dt><a name="overlay_root"></a><strong>overlay_root</strong> ()</dt> -<dd> - - -Determines the overlay root used by opkg. - - - - - - - - -<h3>Return value:</h3> -String containing the directory path of the overlay root. - - - -</dd> - - - - -<dt><a name="remove"></a><strong>remove</strong> (...)</dt> -<dd> - - -Remove one or more packages. - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: List of packages to install - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating the status of the action - - <li>OPKG return code, STDOUT and STDERR - -</ol> - - - -</dd> - - - - -<dt><a name="status"></a><strong>status</strong> (pkg)</dt> -<dd> - - -Return the package status of one or more packages. - - - -<h3>Parameters</h3> -<ul> - - <li> - pkg: Limit output to a (set of) packages - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing package status information - - - -</dd> - - - - -<dt><a name="update"></a><strong>update</strong> ()</dt> -<dd> - - -Update package lists. - - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating the status of the action - - <li>OPKG return code, STDOUT and STDERR - -</ol> - - - -</dd> - - - - -<dt><a name="upgrade"></a><strong>upgrade</strong> ()</dt> -<dd> - - -Upgrades all installed packages. - - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating the status of the action - - <li>OPKG return code, STDOUT and STDERR - -</ol> - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.model.uci.html b/documentation/api/modules/luci.model.uci.html deleted file mode 100644 index c1eaf5f813..0000000000 --- a/documentation/api/modules/luci.model.uci.html +++ /dev/null @@ -1,1631 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li><strong>luci.model.uci</strong></li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.model.uci</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#Cursor.add">Cursor:add</a> (config, type)</td> - <td class="summary"> - -Add an anonymous section.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.apply">Cursor:apply</a> (rollback)</td> - <td class="summary"> - -Applies UCI configuration changes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.changes">Cursor:changes</a> (config)</td> - <td class="summary"> - -Get a table of saved but uncommitted changes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.commit">Cursor:commit</a> (config)</td> - <td class="summary"> - -Commit saved changes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.confirm">Cursor:confirm</a> ()</td> - <td class="summary"> - -Confirms UCI apply process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.delete">Cursor:delete</a> (config, section, option)</td> - <td class="summary"> - -Deletes a section or an option.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.delete_all">Cursor:delete_all</a> (config, type, comparator)</td> - <td class="summary"> - -Delete all sections of a given type that match certain criteria.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.foreach">Cursor:foreach</a> (config, type, callback)</td> - <td class="summary"> - -Call a function for every section of a certain type.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get">Cursor:get</a> (config, section, option)</td> - <td class="summary"> - -Get a section type or an option - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_all">Cursor:get_all</a> (config, section)</td> - <td class="summary"> - -Get all sections of a config or all values of a section.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_bool">Cursor:get_bool</a> (config, section, option)</td> - <td class="summary"> - -Get a boolean option and return it's value as true or false.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_confdir">Cursor:get_confdir</a> ()</td> - <td class="summary"> - -Get the configuration directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_first">Cursor:get_first</a> (config, type, option, default)</td> - <td class="summary"> - -Get the given option from the first section with the given type.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_list">Cursor:get_list</a> (config, section, option)</td> - <td class="summary"> - -Get an option or list and return values as table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_savedir">Cursor:get_savedir</a> ()</td> - <td class="summary"> - -Get the directory for uncomitted changes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.get_session_id">Cursor:get_session_id</a> ()</td> - <td class="summary"> - -Get the effective session ID.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.load">Cursor:load</a> (config)</td> - <td class="summary"> - -Manually load a config.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.revert">Cursor:revert</a> (config)</td> - <td class="summary"> - -Revert saved but uncommitted changes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.rollback">Cursor:rollback</a> ()</td> - <td class="summary"> - -Cancels UCI apply process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.rollback_pending">Cursor:rollback_pending</a> ()</td> - <td class="summary"> - -Checks whether a pending rollback is scheduled.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.save">Cursor:save</a> (config)</td> - <td class="summary"> - -Saves changes made to a config to make them committable.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.section">Cursor:section</a> (config, type, name, values)</td> - <td class="summary"> - -Create a new section and initialize it with data.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.set">Cursor:set</a> (config, section, option, value)</td> - <td class="summary"> - -Set a value or create a named section.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.set_confdir">Cursor:set_confdir</a> (directory)</td> - <td class="summary"> - -Set the configuration directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.set_list">Cursor:set_list</a> (config, section, option, value)</td> - <td class="summary"> - -Set given values as list.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.set_savedir">Cursor:set_savedir</a> (directory)</td> - <td class="summary"> - -Set the directory for uncommitted changes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.set_session_id">Cursor:set_session_id</a> (id)</td> - <td class="summary"> - -Set the effective session ID.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.substate">Cursor:substate</a> ()</td> - <td class="summary"> - -Create a sub-state of this cursor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.tset">Cursor:tset</a> (config, section, values)</td> - <td class="summary"> - -Updated the data of a section using data from a table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Cursor.unload">Cursor:unload</a> (config)</td> - <td class="summary"> - -Discard changes made to a config.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cursor">cursor</a> ()</td> - <td class="summary"> - -Create a new UCI-Cursor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cursor_state">cursor_state</a> ()</td> - <td class="summary"> - -Create a new Cursor initialized to the state directory.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="Cursor.add"></a><strong>Cursor:add</strong> (config, type)</dt> -<dd> - - -Add an anonymous section. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - type: UCI section type - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Name of created section - - - -</dd> - - - - -<dt><a name="Cursor.apply"></a><strong>Cursor:apply</strong> (rollback)</dt> -<dd> - - -Applies UCI configuration changes. - -If the rollback parameter is set to true, the apply function will invoke the -rollback mechanism which causes the configuration to be automatically reverted -if no confirm() call occurs within a certain timeout. - -The current default timeout is 30s and can be increased using the -"luci.apply.timeout" uci configuration key. - - - -<h3>Parameters</h3> -<ul> - - <li> - rollback: Enable rollback mechanism - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.changes"></a><strong>Cursor:changes</strong> (config)</dt> -<dd> - - -Get a table of saved but uncommitted changes. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table of changes - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Cursor.save"> - Cursor:save - </a> - -</ul> - -</dd> - - - - -<dt><a name="Cursor.commit"></a><strong>Cursor:commit</strong> (config)</dt> -<dd> - - -Commit saved changes. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Cursor.revert"> - Cursor:revert - </a> - - <li><a href="#Cursor.save"> - Cursor:save - </a> - -</ul> - -</dd> - - - - -<dt><a name="Cursor.confirm"></a><strong>Cursor:confirm</strong> ()</dt> -<dd> - - -Confirms UCI apply process. - -If a previous UCI apply with rollback has been invoked using apply(true), -this function confirms the process and cancels the pending rollback timer. - -If no apply with rollback session is active, the function has no effect and -returns with a "No data" error. - - - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.delete"></a><strong>Cursor:delete</strong> (config, section, option)</dt> -<dd> - - -Deletes a section or an option. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name - </li> - - <li> - option: UCI option (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.delete_all"></a><strong>Cursor:delete_all</strong> (config, type, comparator)</dt> -<dd> - - -Delete all sections of a given type that match certain criteria. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - type: UCI section type - </li> - - <li> - comparator: Function that will be called for each section and returns - a boolean whether to delete the current section (optional) - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="Cursor.foreach"></a><strong>Cursor:foreach</strong> (config, type, callback)</dt> -<dd> - - -Call a function for every section of a certain type. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - type: UCI section type - </li> - - <li> - callback: Function to be called - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.get"></a><strong>Cursor:get</strong> (config, section, option)</dt> -<dd> - - -Get a section type or an option - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name - </li> - - <li> - option: UCI option (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -UCI value - - - -</dd> - - - - -<dt><a name="Cursor.get_all"></a><strong>Cursor:get_all</strong> (config, section)</dt> -<dd> - - -Get all sections of a config or all values of a section. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table of UCI sections or table of UCI values - - - -</dd> - - - - -<dt><a name="Cursor.get_bool"></a><strong>Cursor:get_bool</strong> (config, section, option)</dt> -<dd> - - -Get a boolean option and return it's value as true or false. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name - </li> - - <li> - option: UCI option - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean - - - -</dd> - - - - -<dt><a name="Cursor.get_confdir"></a><strong>Cursor:get_confdir</strong> ()</dt> -<dd> - - -Get the configuration directory. - - - - - - - - -<h3>Return value:</h3> -Configuration directory - - - -</dd> - - - - -<dt><a name="Cursor.get_first"></a><strong>Cursor:get_first</strong> (config, type, option, default)</dt> -<dd> - - -Get the given option from the first section with the given type. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - type: UCI section type - </li> - - <li> - option: UCI option (optional) - </li> - - <li> - default: Default value (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -UCI value - - - -</dd> - - - - -<dt><a name="Cursor.get_list"></a><strong>Cursor:get_list</strong> (config, section, option)</dt> -<dd> - - -Get an option or list and return values as table. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name - </li> - - <li> - option: UCI option - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -table. If the option was not found, you will simply get an empty - table. - - - -</dd> - - - - -<dt><a name="Cursor.get_savedir"></a><strong>Cursor:get_savedir</strong> ()</dt> -<dd> - - -Get the directory for uncomitted changes. - - - - - - - - -<h3>Return value:</h3> -Save directory - - - -</dd> - - - - -<dt><a name="Cursor.get_session_id"></a><strong>Cursor:get_session_id</strong> ()</dt> -<dd> - - -Get the effective session ID. - - - - - - - - -<h3>Return value:</h3> -String containing the session ID - - - -</dd> - - - - -<dt><a name="Cursor.load"></a><strong>Cursor:load</strong> (config)</dt> -<dd> - - -Manually load a config. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Cursor.save"> - Cursor:save - </a> - - <li><a href="#Cursor.unload"> - Cursor:unload - </a> - -</ul> - -</dd> - - - - -<dt><a name="Cursor.revert"></a><strong>Cursor:revert</strong> (config)</dt> -<dd> - - -Revert saved but uncommitted changes. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Cursor.commit"> - Cursor:commit - </a> - - <li><a href="#Cursor.save"> - Cursor:save - </a> - -</ul> - -</dd> - - - - -<dt><a name="Cursor.rollback"></a><strong>Cursor:rollback</strong> ()</dt> -<dd> - - -Cancels UCI apply process. - -If a previous UCI apply with rollback has been invoked using apply(true), -this function cancels the process and rolls back the configuration to the -pre-apply state. - -If no apply with rollback session is active, the function has no effect and -returns with a "No data" error. - - - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.rollback_pending"></a><strong>Cursor:rollback_pending</strong> ()</dt> -<dd> - - -Checks whether a pending rollback is scheduled. - -If a previous UCI apply with rollback has been invoked using apply(true), -and has not been confirmed or rolled back yet, this function returns true -and the remaining time until rollback in seconds. If no rollback is pending, -the function returns false. On error, the function returns false and an -additional string describing the error. - - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean whether rollback is pending - - <li>Remaining time in seconds - -</ol> - - - -</dd> - - - - -<dt><a name="Cursor.save"></a><strong>Cursor:save</strong> (config)</dt> -<dd> - - -Saves changes made to a config to make them committable. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Cursor.load"> - Cursor:load - </a> - - <li><a href="#Cursor.unload"> - Cursor:unload - </a> - -</ul> - -</dd> - - - - -<dt><a name="Cursor.section"></a><strong>Cursor:section</strong> (config, type, name, values)</dt> -<dd> - - -Create a new section and initialize it with data. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - type: UCI section type - </li> - - <li> - name: UCI section name (optional) - </li> - - <li> - values: Table of key - value pairs to initialize the section with - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Name of created section - - - -</dd> - - - - -<dt><a name="Cursor.set"></a><strong>Cursor:set</strong> (config, section, option, value)</dt> -<dd> - - -Set a value or create a named section. - -When invoked with three arguments <code>config</code>, <code>sectionname</code>, <code>sectiontype</code>, -then a named section of the given type is created. - -When invoked with four arguments <code>config</code>, <code>sectionname</code>, <code>optionname</code> and -<code>optionvalue</code> then the value of the specified option is set to the given value. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name - </li> - - <li> - option: UCI option or UCI section type - </li> - - <li> - value: UCI value or nothing if you want to create a section - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.set_confdir"></a><strong>Cursor:set_confdir</strong> (directory)</dt> -<dd> - - -Set the configuration directory. - - - -<h3>Parameters</h3> -<ul> - - <li> - directory: UCI configuration directory - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.set_list"></a><strong>Cursor:set_list</strong> (config, section, option, value)</dt> -<dd> - - -Set given values as list. Setting a list option to an empty list -has the same effect as deleting the option. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name - </li> - - <li> - option: UCI option - </li> - - <li> - value: Value or table. Non-table values will be set as single - item UCI list. - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.set_savedir"></a><strong>Cursor:set_savedir</strong> (directory)</dt> -<dd> - - -Set the directory for uncommitted changes. - - - -<h3>Parameters</h3> -<ul> - - <li> - directory: UCI changes directory - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.set_session_id"></a><strong>Cursor:set_session_id</strong> (id)</dt> -<dd> - - -Set the effective session ID. - - - -<h3>Parameters</h3> -<ul> - - <li> - id: String containing the session ID to set - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -</dd> - - - - -<dt><a name="Cursor.substate"></a><strong>Cursor:substate</strong> ()</dt> -<dd> - - -Create a sub-state of this cursor. - -The sub-state is tied to the parent cursor, means it the parent unloads or -loads configs, the sub state will do so as well. - - - - - - - - -<h3>Return value:</h3> -UCI state cursor tied to the parent cursor - - - -</dd> - - - - -<dt><a name="Cursor.tset"></a><strong>Cursor:tset</strong> (config, section, values)</dt> -<dd> - - -Updated the data of a section using data from a table. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - - <li> - section: UCI section name (optional) - </li> - - <li> - values: Table of key - value pairs to update the section with - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="Cursor.unload"></a><strong>Cursor:unload</strong> (config)</dt> -<dd> - - -Discard changes made to a config. - - - -<h3>Parameters</h3> -<ul> - - <li> - config: UCI config - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean whether operation succeeded - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Cursor.load"> - Cursor:load - </a> - - <li><a href="#Cursor.save"> - Cursor:save - </a> - -</ul> - -</dd> - - - - -<dt><a name="cursor"></a><strong>cursor</strong> ()</dt> -<dd> - - -Create a new UCI-Cursor. - - - - - - - - -<h3>Return value:</h3> -UCI-Cursor - - - -</dd> - - - - -<dt><a name="cursor_state"></a><strong>cursor_state</strong> ()</dt> -<dd> - - -Create a new Cursor initialized to the state directory. - - - - - - - - -<h3>Return value:</h3> -UCI cursor - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.rpcc.html b/documentation/api/modules/luci.rpcc.html deleted file mode 100644 index 18065788bd..0000000000 --- a/documentation/api/modules/luci.rpcc.html +++ /dev/null @@ -1,324 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li><strong>luci.rpcc</strong></li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.rpcc</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#Client.proxy">Client:proxy</a> (prefix)</td> - <td class="summary"> - -Create a transparent RPC proxy.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Client.request">Client:request</a> (method, params, notification)</td> - <td class="summary"> - -Request an RP call and get the response.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="Client.proxy"></a><strong>Client:proxy</strong> (prefix)</dt> -<dd> - - -Create a transparent RPC proxy. - - - -<h3>Parameters</h3> -<ul> - - <li> - prefix: Method prefix - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -RPC Proxy object - - - -</dd> - - - - -<dt><a name="Client.request"></a><strong>Client:request</strong> (method, params, notification)</dt> -<dd> - - -Request an RP call and get the response. - - - -<h3>Parameters</h3> -<ul> - - <li> - method: Remote method - </li> - - <li> - params: Parameters - </li> - - <li> - notification: Notification only? - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -response - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.rpcc.ruci.html b/documentation/api/modules/luci.rpcc.ruci.html deleted file mode 100644 index 7348f1932b..0000000000 --- a/documentation/api/modules/luci.rpcc.ruci.html +++ /dev/null @@ -1,277 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li><strong>luci.rpcc.ruci</strong></li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.rpcc.ruci</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#factory">factory</a> (rpccl)</td> - <td class="summary"> - -Create a new UCI over RPC proxy.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="factory"></a><strong>factory</strong> (rpccl)</dt> -<dd> - - -Create a new UCI over RPC proxy. - - - -<h3>Parameters</h3> -<ul> - - <li> - rpccl: RPC client - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Network transparent UCI module - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.html b/documentation/api/modules/luci.sys.html deleted file mode 100644 index b86d280fba..0000000000 --- a/documentation/api/modules/luci.sys.html +++ /dev/null @@ -1,641 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li><strong>luci.sys</strong></li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.sys</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#call">call</a> (...)</td> - <td class="summary"> - -Execute a given shell command and return the error code - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#dmesg">dmesg</a> ()</td> - <td class="summary"> - -Retrieves the output of the "dmesg" command.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#exec">exec</a> (command)</td> - <td class="summary"> - -Execute a given shell command and capture its standard output - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#getenv">getenv</a> (var)</td> - <td class="summary"> - -Retrieve environment variables.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#hostname">hostname</a> (String)</td> - <td class="summary"> - -Get or set the current hostname.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#httpget">httpget</a> (url, stream, target)</td> - <td class="summary"> - -Returns the contents of a documented referred by an URL.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#mounts">mounts</a> ()</td> - <td class="summary"> - -Retrieve information about currently mounted file systems.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#reboot">reboot</a> ()</td> - <td class="summary"> - -Initiate a system reboot.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#syslog">syslog</a> ()</td> - <td class="summary"> - -Retrieves the output of the "logread" command.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#uniqueid">uniqueid</a> (bytes)</td> - <td class="summary"> - -Generates a random id with specified length.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#uptime">uptime</a> ()</td> - <td class="summary"> - -Returns the current system uptime stats.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="call"></a><strong>call</strong> (...)</dt> -<dd> - - -Execute a given shell command and return the error code - - - -<h3>Parameters</h3> -<ul> - - <li> - ...: Command to call - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Error code of the command - - - -</dd> - - - - -<dt><a name="dmesg"></a><strong>dmesg</strong> ()</dt> -<dd> - - -Retrieves the output of the "dmesg" command. - - - - - - - - -<h3>Return value:</h3> -String containing the current log buffer - - - -</dd> - - - - -<dt><a name="exec"></a><strong>exec</strong> (command)</dt> -<dd> - - -Execute a given shell command and capture its standard output - - - -<h3>Parameters</h3> -<ul> - - <li> - command: Command to call - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the return the output of the command - - - -</dd> - - - - -<dt><a name="getenv"></a><strong>getenv</strong> (var)</dt> -<dd> - - -Retrieve environment variables. If no variable is given then a table - -containing the whole environment is returned otherwise this function returns -the corresponding string value for the given name or nil if no such variable -exists. - - -<h3>Parameters</h3> -<ul> - - <li> - var: Name of the environment variable to retrieve (optional) - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>String containing the value of the specified variable - - <li>Table containing all variables if no variable name is given - -</ol> - - - -</dd> - - - - -<dt><a name="hostname"></a><strong>hostname</strong> (String)</dt> -<dd> - - -Get or set the current hostname. - - - -<h3>Parameters</h3> -<ul> - - <li> - String: containing a new hostname to set (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the system hostname - - - -</dd> - - - - -<dt><a name="httpget"></a><strong>httpget</strong> (url, stream, target)</dt> -<dd> - - -Returns the contents of a documented referred by an URL. - - - -<h3>Parameters</h3> -<ul> - - <li> - url: The URL to retrieve - </li> - - <li> - stream: Return a stream instead of a buffer - </li> - - <li> - target: Directly write to target file name - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the contents of given the URL - - - -</dd> - - - - -<dt><a name="mounts"></a><strong>mounts</strong> ()</dt> -<dd> - - -Retrieve information about currently mounted file systems. - - - - - - - - -<h3>Return value:</h3> -Table containing mount information - - - -</dd> - - - - -<dt><a name="reboot"></a><strong>reboot</strong> ()</dt> -<dd> - - -Initiate a system reboot. - - - - - - - - -<h3>Return value:</h3> -Return value of os.execute() - - - -</dd> - - - - -<dt><a name="syslog"></a><strong>syslog</strong> ()</dt> -<dd> - - -Retrieves the output of the "logread" command. - - - - - - - - -<h3>Return value:</h3> -String containing the current log buffer - - - -</dd> - - - - -<dt><a name="uniqueid"></a><strong>uniqueid</strong> (bytes)</dt> -<dd> - - -Generates a random id with specified length. - - - -<h3>Parameters</h3> -<ul> - - <li> - bytes: Number of bytes for the unique id - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing hex encoded id - - - -</dd> - - - - -<dt><a name="uptime"></a><strong>uptime</strong> ()</dt> -<dd> - - -Returns the current system uptime stats. - - - - - - - - -<h3>Return value:</h3> -String containing total uptime in seconds - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.init.html b/documentation/api/modules/luci.sys.init.html deleted file mode 100644 index e2c51f9531..0000000000 --- a/documentation/api/modules/luci.sys.init.html +++ /dev/null @@ -1,512 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li><strong>luci.sys.init</strong></li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.sys.init</code></h1> - -<p> - -LuCI system utilities / init related functions. -</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#init.disable">disable</a> (name)</td> - <td class="summary"> - -Disable the given init script - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#init.enable">enable</a> (name)</td> - <td class="summary"> - -Enable the given init script - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#init.enabled">enabled</a> (name)</td> - <td class="summary"> - -Test whether the given init script is enabled - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#init.index">index</a> (name)</td> - <td class="summary"> - -Get the index of he given init script - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#init.names">names</a> ()</td> - <td class="summary"> - -Get the names of all installed init scripts - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#init.start">start</a> (name)</td> - <td class="summary"> - -Start the given init script - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#init.stop">stop</a> (name)</td> - <td class="summary"> - -Stop the given init script - </td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="init.disable"></a><strong>disable</strong> (name)</dt> -<dd> - - -Disable the given init script - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the init script - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating success - - - -</dd> - - - - -<dt><a name="init.enable"></a><strong>enable</strong> (name)</dt> -<dd> - - -Enable the given init script - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the init script - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating success - - - -</dd> - - - - -<dt><a name="init.enabled"></a><strong>enabled</strong> (name)</dt> -<dd> - - -Test whether the given init script is enabled - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the init script - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating whether init is enabled - - - -</dd> - - - - -<dt><a name="init.index"></a><strong>index</strong> (name)</dt> -<dd> - - -Get the index of he given init script - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the init script - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Numeric index value - - - -</dd> - - - - -<dt><a name="init.names"></a><strong>names</strong> ()</dt> -<dd> - - -Get the names of all installed init scripts - - - - - - - - -<h3>Return value:</h3> -Table containing the names of all inistalled init scripts - - - -</dd> - - - - -<dt><a name="init.start"></a><strong>start</strong> (name)</dt> -<dd> - - -Start the given init script - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the init script - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating success - - - -</dd> - - - - -<dt><a name="init.stop"></a><strong>stop</strong> (name)</dt> -<dd> - - -Stop the given init script - - - -<h3>Parameters</h3> -<ul> - - <li> - name: Name of the init script - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating success - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.iptparser.html b/documentation/api/modules/luci.sys.iptparser.html deleted file mode 100644 index 5928281cf4..0000000000 --- a/documentation/api/modules/luci.sys.iptparser.html +++ /dev/null @@ -1,462 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li><strong>luci.sys.iptparser</strong></li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>luci.sys.iptparser</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#IptParser">IptParser</a> (family)</td> - <td class="summary"> - -Create a new iptables parser object.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IptParser.chain">IptParser:chain</a> (table, chain)</td> - <td class="summary"> - -Return the given firewall chain within the given table name.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IptParser.chains">IptParser:chains</a> (table)</td> - <td class="summary"> - -Find the names of all chains within the given table name.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IptParser.is_custom_target">IptParser:is_custom_target</a> (target)</td> - <td class="summary"> - -Test whether the given target points to a custom chain.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IptParser.resync">IptParser:resync</a> ()</td> - <td class="summary"> - -Rebuild the internal lookup table, for example when rules have changed - -through external commands.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#IptParser.tables">IptParser:tables</a> ()</td> - <td class="summary"> - -Find the names of all tables.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="IptParser"></a><strong>IptParser</strong> (family)</dt> -<dd> - - -Create a new iptables parser object. - - - -<h3>Parameters</h3> -<ul> - - <li> - family: Number specifying the address family. 4 for IPv4, 6 for IPv6 - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -IptParser instance - - - -</dd> - - - - -<dt><a name="IptParser.chain"></a><strong>IptParser:chain</strong> (table, chain)</dt> -<dd> - - -Return the given firewall chain within the given table name. - - - -<h3>Parameters</h3> -<ul> - - <li> - table: String containing the table name - </li> - - <li> - chain: String containing the chain name - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing the fields "policy", "packets", "bytes" - and "rules". The "rules" field is a table of rule tables. - - - -</dd> - - - - -<dt><a name="IptParser.chains"></a><strong>IptParser:chains</strong> (table)</dt> -<dd> - - -Find the names of all chains within the given table name. - - - -<h3>Parameters</h3> -<ul> - - <li> - table: String containing the table name - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table of chain names in the order they occur. - - - -</dd> - - - - -<dt><a name="IptParser.is_custom_target"></a><strong>IptParser:is_custom_target</strong> (target)</dt> -<dd> - - -Test whether the given target points to a custom chain. - - - -<h3>Parameters</h3> -<ul> - - <li> - target: String containing the target action - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating whether target is a custom chain. - - - -</dd> - - - - -<dt><a name="IptParser.resync"></a><strong>IptParser:resync</strong> ()</dt> -<dd> - - -Rebuild the internal lookup table, for example when rules have changed - -through external commands. - - - - - - - -<h3>Return value:</h3> -nothing - - - -</dd> - - - - -<dt><a name="IptParser.tables"></a><strong>IptParser:tables</strong> ()</dt> -<dd> - - -Find the names of all tables. - - - - - - - - -<h3>Return value:</h3> -Table of table names. - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.net.html b/documentation/api/modules/luci.sys.net.html deleted file mode 100644 index e7802bb244..0000000000 --- a/documentation/api/modules/luci.sys.net.html +++ /dev/null @@ -1,597 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li><strong>luci.sys.net</strong></li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.sys.net</code></h1> - -<p> - -LuCI system utilities / network related functions. -</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#net.arptable">arptable</a> ()</td> - <td class="summary"> - -Returns the current arp-table entries as two-dimensional table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.conntrack">conntrack</a> ()</td> - <td class="summary"> - -Returns conntrack information - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.deviceinfo">deviceinfo</a> ()</td> - <td class="summary"> - -Return information about available network interfaces.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.devices">devices</a> ()</td> - <td class="summary"> - -Determine the names of available network interfaces.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.host_hints">host_hints</a> ()</td> - <td class="summary"> - -Returns a two-dimensional table of host hints.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.ipv4_hints">ipv4_hints</a> ()</td> - <td class="summary"> - -Returns a two-dimensional table of IPv4 address hints.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.ipv6_hints">ipv6_hints</a> ()</td> - <td class="summary"> - -Returns a two-dimensional table of IPv6 address hints.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.mac_hints">mac_hints</a> ()</td> - <td class="summary"> - -Returns a two-dimensional table of mac address hints.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.pingtest">pingtest</a> (host)</td> - <td class="summary"> - -Tests whether the given host responds to ping probes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.routes">routes</a> ()</td> - <td class="summary"> - -Returns the current kernel routing table entries.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#net.routes6">routes6</a> ()</td> - <td class="summary"> - -Returns the current ipv6 kernel routing table entries.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="net.arptable"></a><strong>arptable</strong> ()</dt> -<dd> - - -Returns the current arp-table entries as two-dimensional table. - - - - - - - - -<h3>Return value:</h3> -Table of table containing the current arp entries. - The following fields are defined for arp entry objects: - { "IP address", "HW address", "HW type", "Flags", "Mask", "Device" } - - - -</dd> - - - - -<dt><a name="net.conntrack"></a><strong>conntrack</strong> ()</dt> -<dd> - - -Returns conntrack information - - - - - - - - -<h3>Return value:</h3> -Table with the currently tracked IP connections - - - -</dd> - - - - -<dt><a name="net.deviceinfo"></a><strong>deviceinfo</strong> ()</dt> -<dd> - - -Return information about available network interfaces. - - - - - - - - -<h3>Return value:</h3> -Table containing all current interface names and their information - - - -</dd> - - - - -<dt><a name="net.devices"></a><strong>devices</strong> ()</dt> -<dd> - - -Determine the names of available network interfaces. - - - - - - - - -<h3>Return value:</h3> -Table containing all current interface names - - - -</dd> - - - - -<dt><a name="net.host_hints"></a><strong>host_hints</strong> ()</dt> -<dd> - - -Returns a two-dimensional table of host hints. - - - - - - - - -<h3>Return value:</h3> -Table of table containing known hosts from various sources, - indexed by mac address. Each subtable contains at least one - of the fields "name", "ipv4" or "ipv6". - - - -</dd> - - - - -<dt><a name="net.ipv4_hints"></a><strong>ipv4_hints</strong> ()</dt> -<dd> - - -Returns a two-dimensional table of IPv4 address hints. - - - - - - - - -<h3>Return value:</h3> -Table of table containing known hosts from various sources. - Each entry contains the values in the following order: - [ "ip", "name" ] - - - -</dd> - - - - -<dt><a name="net.ipv6_hints"></a><strong>ipv6_hints</strong> ()</dt> -<dd> - - -Returns a two-dimensional table of IPv6 address hints. - - - - - - - - -<h3>Return value:</h3> -Table of table containing known hosts from various sources. - Each entry contains the values in the following order: - [ "ip", "name" ] - - - -</dd> - - - - -<dt><a name="net.mac_hints"></a><strong>mac_hints</strong> ()</dt> -<dd> - - -Returns a two-dimensional table of mac address hints. - - - - - - - - -<h3>Return value:</h3> -Table of table containing known hosts from various sources. - Each entry contains the values in the following order: - [ "mac", "name" ] - - - -</dd> - - - - -<dt><a name="net.pingtest"></a><strong>pingtest</strong> (host)</dt> -<dd> - - -Tests whether the given host responds to ping probes. - - - -<h3>Parameters</h3> -<ul> - - <li> - host: String containing a hostname or IPv4 address - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Number containing 0 on success and >= 1 on error - - - -</dd> - - - - -<dt><a name="net.routes"></a><strong>routes</strong> ()</dt> -<dd> - - -Returns the current kernel routing table entries. - - - - - - - - -<h3>Return value:</h3> -Table of tables with properties of the corresponding routes. - The following fields are defined for route entry tables: - { "dest", "gateway", "metric", "refcount", "usecount", "irtt", - "flags", "device" } - - - -</dd> - - - - -<dt><a name="net.routes6"></a><strong>routes6</strong> ()</dt> -<dd> - - -Returns the current ipv6 kernel routing table entries. - - - - - - - - -<h3>Return value:</h3> -Table of tables with properties of the corresponding routes. - The following fields are defined for route entry tables: - { "source", "dest", "nexthop", "metric", "refcount", "usecount", - "flags", "device" } - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.process.html b/documentation/api/modules/luci.sys.process.html deleted file mode 100644 index d3664817cc..0000000000 --- a/documentation/api/modules/luci.sys.process.html +++ /dev/null @@ -1,519 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li><strong>luci.sys.process</strong></li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.sys.process</code></h1> - -<p> - -LuCI system utilities / process related functions. -</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#process.exec">exec</a> (commend, stdout, stderr, nowait)</td> - <td class="summary"> - -Execute a process, optionally capturing stdio.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#process.info">info</a> ()</td> - <td class="summary"> - -Get the current process id.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#process.list">list</a> ()</td> - <td class="summary"> - -Retrieve information about currently running processes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#process.setgroup">setgroup</a> (gid)</td> - <td class="summary"> - -Set the gid of a process identified by given pid.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#process.setuser">setuser</a> (uid)</td> - <td class="summary"> - -Set the uid of a process identified by given pid.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#process.signal">signal</a> (pid, sig)</td> - <td class="summary"> - -Send a signal to a process identified by given pid.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="process.exec"></a><strong>exec</strong> (commend, stdout, stderr, nowait)</dt> -<dd> - - -Execute a process, optionally capturing stdio. - -Executes the process specified by the given argv vector, e.g. -<code>{ "/bin/sh", "-c", "echo 1" }</code> and waits for it to terminate unless a true -value has been passed for the "nowait" parameter. - -When a function value is passed for the stdout or stderr arguments, the passed -function is repeatedly called for each chunk read from the corresponding stdio -stream. The read data is passed as string containing at most 4096 bytes at a -time. - -When a true, non-function value is passed for the stdout or stderr arguments, -the data of the corresponding stdio stream is read into an internal string -buffer and returned as "stdout" or "stderr" field respectively in the result -table. - -When a true value is passed to the nowait parameter, the function does not -await process termination but returns as soon as all captured stdio streams -have been closed or - if no streams are captured - immediately after launching -the process. - - - -<h3>Parameters</h3> -<ul> - - <li> - commend: Table containing the argv vector to execute - </li> - - <li> - stdout: Callback function or boolean to indicate capturing (optional) - </li> - - <li> - stderr: Callback function or boolean to indicate capturing (optional) - </li> - - <li> - nowait: Don't wait for process termination when true (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing at least the fields "code" which holds the exit - status of the invoked process or "-1" on error and "pid", which - contains the process id assigned to the spawned process. When - stdout and/or stderr capturing has been requested, it additionally - contains "stdout" and "stderr" fields respectively, holding the - captured stdio data as string. - - - -</dd> - - - - -<dt><a name="process.info"></a><strong>info</strong> ()</dt> -<dd> - - -Get the current process id. - - - - - - - - -<h3>Return value:</h3> -Number containing the current pid - - - -</dd> - - - - -<dt><a name="process.list"></a><strong>list</strong> ()</dt> -<dd> - - -Retrieve information about currently running processes. - - - - - - - - -<h3>Return value:</h3> -Table containing process information - - - -</dd> - - - - -<dt><a name="process.setgroup"></a><strong>setgroup</strong> (gid)</dt> -<dd> - - -Set the gid of a process identified by given pid. - - - -<h3>Parameters</h3> -<ul> - - <li> - gid: Number containing the Unix group id - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating successful operation - - <li>String containing the error message if failed - - <li>Number containing the error code if failed - -</ol> - - - -</dd> - - - - -<dt><a name="process.setuser"></a><strong>setuser</strong> (uid)</dt> -<dd> - - -Set the uid of a process identified by given pid. - - - -<h3>Parameters</h3> -<ul> - - <li> - uid: Number containing the Unix user id - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating successful operation - - <li>String containing the error message if failed - - <li>Number containing the error code if failed - -</ol> - - - -</dd> - - - - -<dt><a name="process.signal"></a><strong>signal</strong> (pid, sig)</dt> -<dd> - - -Send a signal to a process identified by given pid. - - - -<h3>Parameters</h3> -<ul> - - <li> - pid: Number containing the process id - </li> - - <li> - sig: Signal to send (default: 15 [SIGTERM]) - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Boolean indicating successful operation - - <li>Number containing the error code if failed - -</ol> - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.user.html b/documentation/api/modules/luci.sys.user.html deleted file mode 100644 index b2307ad385..0000000000 --- a/documentation/api/modules/luci.sys.user.html +++ /dev/null @@ -1,412 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li><strong>luci.sys.user</strong></li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.sys.user</code></h1> - -<p> - -LuCI system utilities / user related functions. -</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#getuser">getuser</a> (uid)</td> - <td class="summary"> - -Retrieve user information for given uid.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#user.checkpasswd">checkpasswd</a> (username, pass)</td> - <td class="summary"> - -Test whether given string matches the password of a given system user.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#user.getpasswd">getpasswd</a> (username)</td> - <td class="summary"> - -Retrieve the current user password hash.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#user.setpasswd">setpasswd</a> (username, password)</td> - <td class="summary"> - -Change the password of given user.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="getuser"></a><strong>getuser</strong> (uid)</dt> -<dd> - - -Retrieve user information for given uid. - - - -<h3>Parameters</h3> -<ul> - - <li> - uid: Number containing the Unix user id - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing the following fields: - { "uid", "gid", "name", "passwd", "dir", "shell", "gecos" } - - - -</dd> - - - - -<dt><a name="user.checkpasswd"></a><strong>checkpasswd</strong> (username, pass)</dt> -<dd> - - -Test whether given string matches the password of a given system user. - - - -<h3>Parameters</h3> -<ul> - - <li> - username: String containing the Unix user name - </li> - - <li> - pass: String containing the password to compare - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating whether the passwords are equal - - - -</dd> - - - - -<dt><a name="user.getpasswd"></a><strong>getpasswd</strong> (username)</dt> -<dd> - - -Retrieve the current user password hash. - - - -<h3>Parameters</h3> -<ul> - - <li> - username: String containing the username to retrieve the password for - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>String containing the hash or nil if no password is set. - - <li>Password database entry - -</ol> - - - -</dd> - - - - -<dt><a name="user.setpasswd"></a><strong>setpasswd</strong> (username, password)</dt> -<dd> - - -Change the password of given user. - - - -<h3>Parameters</h3> -<ul> - - <li> - username: String containing the Unix user name - </li> - - <li> - password: String containing the password to compare - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Number containing 0 on success and >= 1 on error - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.sys.wifi.html b/documentation/api/modules/luci.sys.wifi.html deleted file mode 100644 index 6c893244c1..0000000000 --- a/documentation/api/modules/luci.sys.wifi.html +++ /dev/null @@ -1,280 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li><strong>luci.sys.wifi</strong></li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.sys.wifi</code></h1> - -<p> - -LuCI system utilities / wifi related functions. -</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#wifi.getiwinfo">getiwinfo</a> (ifname)</td> - <td class="summary"> - -Get wireless information for given interface.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="wifi.getiwinfo"></a><strong>getiwinfo</strong> (ifname)</dt> -<dd> - - -Get wireless information for given interface. - - - -<h3>Parameters</h3> -<ul> - - <li> - ifname: String containing the interface name - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -A wrapped iwinfo object instance - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/luci.util.html b/documentation/api/modules/luci.util.html deleted file mode 100644 index f8baddf410..0000000000 --- a/documentation/api/modules/luci.util.html +++ /dev/null @@ -1,1830 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li><strong>luci.util</strong></li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>luci.util</code></h1> - -<p></p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#append">append</a> (src, ...)</td> - <td class="summary"> - -Appends numerically indexed tables or single objects to a given table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#bigendian">bigendian</a> ()</td> - <td class="summary"> - -Test whether the current system is operating in big endian mode.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#class">class</a> (base)</td> - <td class="summary"> - -Create a Class object (Python-style object model).</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#clone">clone</a> (object, deep)</td> - <td class="summary"> - -Clones the given object and return it's copy.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cmatch">cmatch</a> (str, pattern)</td> - <td class="summary"> - -Count the occurrences of given substring in given string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#combine">combine</a> (tbl1, tbl2, ...)</td> - <td class="summary"> - -Combines two or more numerically indexed tables and single objects into one table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#contains">contains</a> (table, value)</td> - <td class="summary"> - -Checks whether the given table contains the given value.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#copcall">copcall</a> (f, ...)</td> - <td class="summary"> - -This is a coroutine-safe drop-in replacement for Lua's "pcall"-function - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#coxpcall">coxpcall</a> (f, err, ...)</td> - <td class="summary"> - -This is a coroutine-safe drop-in replacement for Lua's "xpcall"-function - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#dumptable">dumptable</a> (t, maxdepth)</td> - <td class="summary"> - -Recursively dumps a table to stdout, useful for testing and debugging.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#exec">exec</a> (command)</td> - <td class="summary"> - -Execute given commandline and gather stdout.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#execi">execi</a> (command)</td> - <td class="summary"> - -Return a line-buffered iterator over the output of given command.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#get_bytecode">get_bytecode</a> (val)</td> - <td class="summary"> - -Return the current runtime bytecode of the given data.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#imatch">imatch</a> (val)</td> - <td class="summary"> - -Return a matching iterator for the given value.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#instanceof">instanceof</a> (object, class)</td> - <td class="summary"> - -Test whether the given object is an instance of the given class.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#keys">keys</a> (t)</td> - <td class="summary"> - -Retrieve all keys of given associative table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#kspairs">kspairs</a> (t)</td> - <td class="summary"> - -Return a key, value iterator for the given table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#libpath">libpath</a> ()</td> - <td class="summary"> - -Returns the absolute path to LuCI base directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#parse_units">parse_units</a> (ustr)</td> - <td class="summary"> - -Parse certain units from the given string and return the canonical integer -value or 0 if the unit is unknown.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#pcdata">pcdata</a> (value)</td> - <td class="summary"> - -Create valid XML PCDATA from given string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#perror">perror</a> (obj)</td> - <td class="summary"> - -Write given object to stderr.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#restore_data">restore_data</a> (str)</td> - <td class="summary"> - -Restore data previously serialized with serialize_data().</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#serialize_data">serialize_data</a> (val)</td> - <td class="summary"> - -Recursively serialize given data to lua code, suitable for restoring -with loadstring().</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#serialize_json">serialize_json</a> (data, writer)</td> - <td class="summary"> - -Convert data structure to JSON - </td> - </tr> - - <tr> - <td class="name" nowrap><a href="#shellquote">shellquote</a> (value)</td> - <td class="summary"> - -Safely quote value for use in shell commands.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#spairs">spairs</a> (t, f)</td> - <td class="summary"> - -Return a key, value iterator which returns the values sorted according to -the provided callback function.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#split">split</a> (str, pat, max, regex)</td> - <td class="summary"> - -Splits given string on a defined separator sequence and return a table -containing the resulting substrings.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#strip_bytecode">strip_bytecode</a> (code)</td> - <td class="summary"> - -Strips unnecessary lua bytecode from given string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#striptags">striptags</a> (value)</td> - <td class="summary"> - -Strip HTML tags from given string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#threadlocal">threadlocal</a> ()</td> - <td class="summary"> - -Create a new or get an already existing thread local store associated with -the current active coroutine.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#trim">trim</a> (str)</td> - <td class="summary"> - -Remove leading and trailing whitespace from given string value.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#ubus">ubus</a> (object, method, values)</td> - <td class="summary"> - -Issue an ubus call.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#update">update</a> (t, updates)</td> - <td class="summary"> - -Update values in given table with the values from the second given table.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urldecode">urldecode</a> (str, decode_plus)</td> - <td class="summary"> - -Decode an URL-encoded string - optionally decoding the "+" sign to space.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#urlencode">urlencode</a> (str)</td> - <td class="summary"> - -URL-encode given string.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#vspairs">vspairs</a> (t)</td> - <td class="summary"> - -Return a key, value iterator for the given table.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="append"></a><strong>append</strong> (src, ...)</dt> -<dd> - - -Appends numerically indexed tables or single objects to a given table. - - - -<h3>Parameters</h3> -<ul> - - <li> - src: Target table - </li> - - <li> - ...: Objects to insert - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Target table - - - -</dd> - - - - -<dt><a name="bigendian"></a><strong>bigendian</strong> ()</dt> -<dd> - - -Test whether the current system is operating in big endian mode. - - - - - - - - -<h3>Return value:</h3> -Boolean value indicating whether system is big endian - - - -</dd> - - - - -<dt><a name="class"></a><strong>class</strong> (base)</dt> -<dd> - - -Create a Class object (Python-style object model). - -The class object can be instantiated by calling itself. -Any class functions or shared parameters can be attached to this object. -Attaching a table to the class object makes this table shared between -all instances of this class. For object parameters use the __init__ function. -Classes can inherit member functions and values from a base class. -Class can be instantiated by calling them. All parameters will be passed -to the __init__ function of this class - if such a function exists. -The __init__ function must be used to set any object parameters that are not shared -with other objects of this class. Any return values will be ignored. - - - -<h3>Parameters</h3> -<ul> - - <li> - base: The base class to inherit from (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -A class object - - - -<h3>See also:</h3> -<ul> - - <li><a href="#instanceof"> - instanceof - </a> - - <li><a href="#clone"> - clone - </a> - -</ul> - -</dd> - - - - -<dt><a name="clone"></a><strong>clone</strong> (object, deep)</dt> -<dd> - - -Clones the given object and return it's copy. - - - -<h3>Parameters</h3> -<ul> - - <li> - object: Table value to clone - </li> - - <li> - deep: Boolean indicating whether to do recursive cloning - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Cloned table value - - - -</dd> - - - - -<dt><a name="cmatch"></a><strong>cmatch</strong> (str, pattern)</dt> -<dd> - - -Count the occurrences of given substring in given string. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: String to search in - </li> - - <li> - pattern: String containing pattern to find - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Number of found occurrences - - - -</dd> - - - - -<dt><a name="combine"></a><strong>combine</strong> (tbl1, tbl2, ...)</dt> -<dd> - - -Combines two or more numerically indexed tables and single objects into one table. - - - -<h3>Parameters</h3> -<ul> - - <li> - tbl1: Table value to combine - </li> - - <li> - tbl2: Table value to combine - </li> - - <li> - ...: More tables to combine - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table value containing all values of given tables - - - -</dd> - - - - -<dt><a name="contains"></a><strong>contains</strong> (table, value)</dt> -<dd> - - -Checks whether the given table contains the given value. - - - -<h3>Parameters</h3> -<ul> - - <li> - table: Table value - </li> - - <li> - value: Value to search within the given table - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Number indicating the first index at which the given value occurs - within table or false. - - - -</dd> - - - - -<dt><a name="copcall"></a><strong>copcall</strong> (f, ...)</dt> -<dd> - - -This is a coroutine-safe drop-in replacement for Lua's "pcall"-function - - - -<h3>Parameters</h3> -<ul> - - <li> - f: Lua function to be called protected - </li> - - <li> - ...: Parameters passed to the function - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -A boolean whether the function call succeeded and the returns - values of the function or the error object - - - -</dd> - - - - -<dt><a name="coxpcall"></a><strong>coxpcall</strong> (f, err, ...)</dt> -<dd> - - -This is a coroutine-safe drop-in replacement for Lua's "xpcall"-function - - - -<h3>Parameters</h3> -<ul> - - <li> - f: Lua function to be called protected - </li> - - <li> - err: Custom error handler - </li> - - <li> - ...: Parameters passed to the function - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -A boolean whether the function call succeeded and the return - values of either the function or the error handler - - - -</dd> - - - - -<dt><a name="dumptable"></a><strong>dumptable</strong> (t, maxdepth)</dt> -<dd> - - -Recursively dumps a table to stdout, useful for testing and debugging. - - - -<h3>Parameters</h3> -<ul> - - <li> - t: Table value to dump - </li> - - <li> - maxdepth: Maximum depth - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Always nil - - - -</dd> - - - - -<dt><a name="exec"></a><strong>exec</strong> (command)</dt> -<dd> - - -Execute given commandline and gather stdout. - - - -<h3>Parameters</h3> -<ul> - - <li> - command: String containing command to execute - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the command's stdout - - - -</dd> - - - - -<dt><a name="execi"></a><strong>execi</strong> (command)</dt> -<dd> - - -Return a line-buffered iterator over the output of given command. - - - -<h3>Parameters</h3> -<ul> - - <li> - command: String containing the command to execute - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Iterator - - - -</dd> - - - - -<dt><a name="get_bytecode"></a><strong>get_bytecode</strong> (val)</dt> -<dd> - - -Return the current runtime bytecode of the given data. The byte code -will be stripped before it is returned. - - - -<h3>Parameters</h3> -<ul> - - <li> - val: Value to return as bytecode - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String value containing the bytecode of the given data - - - -</dd> - - - - -<dt><a name="imatch"></a><strong>imatch</strong> (val)</dt> -<dd> - - -Return a matching iterator for the given value. - -The iterator will return one token per invocation, the tokens are separated by -whitespace. If the input value is a table, it is transformed into a string first. -A nil value will result in a valid iterator which aborts with the first invocation. - - - -<h3>Parameters</h3> -<ul> - - <li> - val: The value to scan (table, string or nil) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Iterator which returns one token per call - - - -</dd> - - - - -<dt><a name="instanceof"></a><strong>instanceof</strong> (object, class)</dt> -<dd> - - -Test whether the given object is an instance of the given class. - - - -<h3>Parameters</h3> -<ul> - - <li> - object: Object instance - </li> - - <li> - class: Class object to test against - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating whether the object is an instance - - - -<h3>See also:</h3> -<ul> - - <li><a href="#class"> - class - </a> - - <li><a href="#clone"> - clone - </a> - -</ul> - -</dd> - - - - -<dt><a name="keys"></a><strong>keys</strong> (t)</dt> -<dd> - - -Retrieve all keys of given associative table. - - - -<h3>Parameters</h3> -<ul> - - <li> - t: Table to extract keys from - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Sorted table containing the keys - - - -</dd> - - - - -<dt><a name="kspairs"></a><strong>kspairs</strong> (t)</dt> -<dd> - - -Return a key, value iterator for the given table. - -The table pairs are sorted by key. - - - -<h3>Parameters</h3> -<ul> - - <li> - t: The table to iterate - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Function value containing the corresponding iterator - - - -</dd> - - - - -<dt><a name="libpath"></a><strong>libpath</strong> ()</dt> -<dd> - - -Returns the absolute path to LuCI base directory. - - - - - - - - -<h3>Return value:</h3> -String containing the directory path - - - -</dd> - - - - -<dt><a name="parse_units"></a><strong>parse_units</strong> (ustr)</dt> -<dd> - - -Parse certain units from the given string and return the canonical integer -value or 0 if the unit is unknown. - -Upper- or lower case is irrelevant. -Recognized units are: - - o "y" - one year (60*60*24*366) - o "m" - one month (60*60*24*31) - o "w" - one week (60*60*24*7) - o "d" - one day (60*60*24) - o "h" - one hour (60*60) - o "min" - one minute (60) - o "kb" - one kilobyte (1024) - o "mb" - one megabyte (1024*1024) - o "gb" - one gigabyte (1024*1024*1024) - o "kib" - one si kilobyte (1000) - o "mib" - one si megabyte (1000*1000) - o "gib" - one si gigabyte (1000*1000*1000) - - - -<h3>Parameters</h3> -<ul> - - <li> - ustr: String containing a numerical value with trailing unit - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Number containing the canonical value - - - -</dd> - - - - -<dt><a name="pcdata"></a><strong>pcdata</strong> (value)</dt> -<dd> - - -Create valid XML PCDATA from given string. - - - -<h3>Parameters</h3> -<ul> - - <li> - value: String value containing the data to escape - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String value containing the escaped data - - - -</dd> - - - - -<dt><a name="perror"></a><strong>perror</strong> (obj)</dt> -<dd> - - -Write given object to stderr. - - - -<h3>Parameters</h3> -<ul> - - <li> - obj: Value to write to stderr - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Boolean indicating whether the write operation was successful - - - -</dd> - - - - -<dt><a name="restore_data"></a><strong>restore_data</strong> (str)</dt> -<dd> - - -Restore data previously serialized with serialize_data(). - - - -<h3>Parameters</h3> -<ul> - - <li> - str: String containing the data to restore - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Value containing the restored data structure - - - -<h3>See also:</h3> -<ul> - - <li><a href="#serialize_data"> - serialize_data - </a> - - <li><a href="#get_bytecode"> - get_bytecode - </a> - -</ul> - -</dd> - - - - -<dt><a name="serialize_data"></a><strong>serialize_data</strong> (val)</dt> -<dd> - - -Recursively serialize given data to lua code, suitable for restoring -with loadstring(). - - - -<h3>Parameters</h3> -<ul> - - <li> - val: Value containing the data to serialize - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String value containing the serialized code - - - -<h3>See also:</h3> -<ul> - - <li><a href="#restore_data"> - restore_data - </a> - - <li><a href="#get_bytecode"> - get_bytecode - </a> - -</ul> - -</dd> - - - - -<dt><a name="serialize_json"></a><strong>serialize_json</strong> (data, writer)</dt> -<dd> - - -Convert data structure to JSON - - - -<h3>Parameters</h3> -<ul> - - <li> - data: The data to serialize - </li> - - <li> - writer: A function to write a chunk of JSON data (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the JSON if called without write callback - - - -</dd> - - - - -<dt><a name="shellquote"></a><strong>shellquote</strong> (value)</dt> -<dd> - - -Safely quote value for use in shell commands. - - - -<h3>Parameters</h3> -<ul> - - <li> - value: String containing the value to quote - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Single-quote enclosed string with embedded quotes escaped - - - -</dd> - - - - -<dt><a name="spairs"></a><strong>spairs</strong> (t, f)</dt> -<dd> - - -Return a key, value iterator which returns the values sorted according to -the provided callback function. - - - -<h3>Parameters</h3> -<ul> - - <li> - t: The table to iterate - </li> - - <li> - f: A callback function to decide the order of elements - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Function value containing the corresponding iterator - - - -</dd> - - - - -<dt><a name="split"></a><strong>split</strong> (str, pat, max, regex)</dt> -<dd> - - -Splits given string on a defined separator sequence and return a table -containing the resulting substrings. - -The optional max parameter specifies the number of bytes to process, -regardless of the actual length of the given string. The optional last -parameter, regex, specifies whether the separator sequence is -nterpreted as regular expression. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: String value containing the data to split up - </li> - - <li> - pat: String with separator pattern (optional, defaults to "\n") - </li> - - <li> - max: Maximum times to split (optional) - </li> - - <li> - regex: Boolean indicating whether to interpret the separator - pattern as regular expression (optional, default is false) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing the resulting substrings - - - -</dd> - - - - -<dt><a name="strip_bytecode"></a><strong>strip_bytecode</strong> (code)</dt> -<dd> - - -Strips unnecessary lua bytecode from given string. - -Information like line numbers and debugging numbers will be discarded. -Original version by Peter Cawley (http://lua-users.org/lists/lua-l/2008-02/msg01158.html) - - - -<h3>Parameters</h3> -<ul> - - <li> - code: String value containing the original lua byte code - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String value containing the stripped lua byte code - - - -</dd> - - - - -<dt><a name="striptags"></a><strong>striptags</strong> (value)</dt> -<dd> - - -Strip HTML tags from given string. - - - -<h3>Parameters</h3> -<ul> - - <li> - value: String containing the HTML text - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String with HTML tags stripped of - - - -</dd> - - - - -<dt><a name="threadlocal"></a><strong>threadlocal</strong> ()</dt> -<dd> - - -Create a new or get an already existing thread local store associated with -the current active coroutine. - -A thread local store is private a table object -whose values can't be accessed from outside of the running coroutine. - - - - - - - - -<h3>Return value:</h3> -Table value representing the corresponding thread local store - - - -</dd> - - - - -<dt><a name="trim"></a><strong>trim</strong> (str)</dt> -<dd> - - -Remove leading and trailing whitespace from given string value. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: String value containing whitespace padded data - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String value with leading and trailing space removed - - - -</dd> - - - - -<dt><a name="ubus"></a><strong>ubus</strong> (object, method, values)</dt> -<dd> - - -Issue an ubus call. - - - -<h3>Parameters</h3> -<ul> - - <li> - object: String containing the ubus object to call - </li> - - <li> - method: String containing the ubus method to call - </li> - - <li> - values: Table containing the values to pass - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containin the ubus result - - - -</dd> - - - - -<dt><a name="update"></a><strong>update</strong> (t, updates)</dt> -<dd> - - -Update values in given table with the values from the second given table. - -Both table are - in fact - merged together. - - - -<h3>Parameters</h3> -<ul> - - <li> - t: Table which should be updated - </li> - - <li> - updates: Table containing the values to update - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Always nil - - - -</dd> - - - - -<dt><a name="urldecode"></a><strong>urldecode</strong> (str, decode_plus)</dt> -<dd> - - -Decode an URL-encoded string - optionally decoding the "+" sign to space. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: Input string in x-www-urlencoded format - </li> - - <li> - decode_plus: Decode "+" signs to spaces if true (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -The decoded string - - - -<h3>See also:</h3> -<ul> - - <li><a href="#urlencode"> - urlencode - </a> - -</ul> - -</dd> - - - - -<dt><a name="urlencode"></a><strong>urlencode</strong> (str)</dt> -<dd> - - -URL-encode given string. - - - -<h3>Parameters</h3> -<ul> - - <li> - str: String to encode - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -String containing the encoded data - - - -<h3>See also:</h3> -<ul> - - <li><a href="#urldecode"> - urldecode - </a> - -</ul> - -</dd> - - - - -<dt><a name="vspairs"></a><strong>vspairs</strong> (t)</dt> -<dd> - - -Return a key, value iterator for the given table. - -The table pairs are sorted by value. - - - -<h3>Parameters</h3> -<ul> - - <li> - t: The table to iterate - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Function value containing the corresponding iterator - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.CHANGELOG.html b/documentation/api/modules/nixio.CHANGELOG.html deleted file mode 100644 index 94b44a5ca6..0000000000 --- a/documentation/api/modules/nixio.CHANGELOG.html +++ /dev/null @@ -1,286 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li><strong>nixio.CHANGELOG</strong></li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio.CHANGELOG</code></h1> - -<p> - Changes and improvements.</p> - - - - - - - - - - -<h2>Tables</h2> -<table class="table_list"> - - <tr> - <td class="name" nowrap><a href="#0.2">0.2</a></td> - <td class="summary"> - Initial Release.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#0.3">0.3</a></td> - <td class="summary"> - Service Release.</td> - </tr> - -</table> - - - -<br/> -<br/> - - - - -<h2><a name="tables"></a>Tables</h2> -<dl class="table"> - -<dt><a name="0.2"></a><strong>0.2</strong></dt> -<dd> - Initial Release. - <ul> - <li>Initial Release</li> - </ul> - - - -</dd> - - -<dt><a name="0.3"></a><strong>0.3</strong></dt> -<dd> - Service Release. - <ul> - <li>Added getifaddrs() function.</li> - <li>Added getsockopt(), setsockopt(), getsockname() and getpeername() - directly to TLS-socket objects unifying the socket interface.</li> - <li>Added support for CyaSSL as cryptographical backend.</li> - <li>Added support for x509 certificates in DER format.</li> - <li>Added support for splice() in UnifiedIO.copyz().</li> - <li>Added interface to inject chunks into UnifiedIO.linesource() buffer.</li> - <li>Changed TLS behaviour to explicitly separate servers and clients.</li> - <li>Fixed usage of signed datatype breaking Base64 decoding.</li> - <li>Fixed namespace clashes for nixio.fs.</li> - <li>Fixed splice() support for some exotic C libraries.</li> - <li>Reconfigure axTLS cryptographical provider and mark it as obsolete.</li> - </ul> - - - -</dd> - - -</dl> - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.CryptoHash.html b/documentation/api/modules/nixio.CryptoHash.html deleted file mode 100644 index 7d2f48b1e5..0000000000 --- a/documentation/api/modules/nixio.CryptoHash.html +++ /dev/null @@ -1,312 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li><strong>nixio.CryptoHash</strong></li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>nixio.CryptoHash</code></h1> - -<p> - Cryptographical Hash and HMAC object.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#CryptoHash.final">CryptoHash:final</a> ()</td> - <td class="summary"> - Finalize the hash and return the digest.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#CryptoHash.update">CryptoHash:update</a> (chunk)</td> - <td class="summary"> - Add another chunk of data to be hashed.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="CryptoHash.final"></a><strong>CryptoHash:final</strong> ()</dt> -<dd> - - Finalize the hash and return the digest. - - - - - -<h3>Usage:</h3> -You cannot call update on a hash object that was already finalized - you can however call final multiple times to get the digest. - - - -<h3>Return values:</h3> -<ol> - - <li>hexdigest - - <li>buffer containing binary digest - -</ol> - - - -</dd> - - - - -<dt><a name="CryptoHash.update"></a><strong>CryptoHash:update</strong> (chunk)</dt> -<dd> - - Add another chunk of data to be hashed. - - -<h3>Parameters</h3> -<ul> - - <li> - chunk: Chunk of data - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -CryptoHash object (self) - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.File.html b/documentation/api/modules/nixio.File.html deleted file mode 100644 index 7a7500a773..0000000000 --- a/documentation/api/modules/nixio.File.html +++ /dev/null @@ -1,669 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li><strong>nixio.File</strong></li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>nixio.File</code></h1> - -<p> - Large File Object. - Large file operations are supported up to 52 bits if the Lua number type is - double (default).</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#File.close">File:close</a> ()</td> - <td class="summary"> - Close the file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.fileno">File:fileno</a> ()</td> - <td class="summary"> - Get the number of the filedescriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.lock">File:lock</a> (command, length)</td> - <td class="summary"> - Apply or test a lock on the file.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.read">File:read</a> (length)</td> - <td class="summary"> - Read from a file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.seek">File:seek</a> (offset, whence)</td> - <td class="summary"> - Reposition read / write offset of the file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.setblocking">File:setblocking</a> (blocking)</td> - <td class="summary"> - (POSIX) Set the blocking mode of the file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.stat">File:stat</a> (field)</td> - <td class="summary"> - Get file status and attributes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.sync">File:sync</a> (data_only)</td> - <td class="summary"> - Synchronizes the file with the storage device.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.tell">File:tell</a> ()</td> - <td class="summary"> - Return the current read / write offset of the file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#File.write">File:write</a> (buffer, offset, length)</td> - <td class="summary"> - Write to the file descriptor.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="File.close"></a><strong>File:close</strong> ()</dt> -<dd> - - Close the file descriptor. - - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="File.fileno"></a><strong>File:fileno</strong> ()</dt> -<dd> - - Get the number of the filedescriptor. - - - - - - - -<h3>Return value:</h3> -file descriptor number - - - -</dd> - - - - -<dt><a name="File.lock"></a><strong>File:lock</strong> (command, length)</dt> -<dd> - - Apply or test a lock on the file. - - -<h3>Parameters</h3> -<ul> - - <li> - command: Locking Command ["lock", "tlock", "ulock", "test"] - </li> - - <li> - length: Amount of Bytes to lock from current offset (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls lockf() on POSIX and _locking() on Windows. - - <li>The "lock" command is blocking, "tlock" is non-blocking, - "ulock" unlocks and "test" only tests for the lock. - - <li>The "test" command is not available on Windows. - - <li>Locks are by default advisory on POSIX, but mandatory on Windows. - -</ul> - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="File.read"></a><strong>File:read</strong> (length)</dt> -<dd> - - Read from a file descriptor. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Amount of data to read (in Bytes). - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li><strong>Warning:</strong> It is not guaranteed that all requested data - is read at once especially when dealing with pipes. - You have to check the return value - the length of the buffer actually read - - or use the safe IO functions in the high-level IO utility module. - - <li>The length of the return buffer is limited by the (compile time) - nixio buffersize which is <em>nixio.const.buffersize</em> (8192 by default). - Any read request greater than that will be safely truncated to this value. - -</ul> - - - -<h3>Return value:</h3> -buffer containing data successfully read - - - -</dd> - - - - -<dt><a name="File.seek"></a><strong>File:seek</strong> (offset, whence)</dt> -<dd> - - Reposition read / write offset of the file descriptor. - The seek will be done either from the beginning of the file or relative - to the current position or relative to the end. - - -<h3>Parameters</h3> -<ul> - - <li> - offset: File Offset - </li> - - <li> - whence: Starting point [<strong>"set"</strong>, "cur", "end"] - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls lseek(). - - - -<h3>Return value:</h3> -new (absolute) offset position - - - -</dd> - - - - -<dt><a name="File.setblocking"></a><strong>File:setblocking</strong> (blocking)</dt> -<dd> - - (POSIX) Set the blocking mode of the file descriptor. - - -<h3>Parameters</h3> -<ul> - - <li> - blocking: (boolean) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="File.stat"></a><strong>File:stat</strong> (field)</dt> -<dd> - - Get file status and attributes. - - -<h3>Parameters</h3> -<ul> - - <li> - field: Only return a specific field, not the whole table (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls fstat(). - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>atime = Last access timestamp</li> - <li>blksize = Blocksize (POSIX only)</li> - <li>blocks = Blocks used (POSIX only)</li> - <li>ctime = Creation timestamp</li> - <li>dev = Device ID</li> - <li>gid = Group ID</li> - <li>ino = Inode</li> - <li>modedec = Mode converted into a decimal number</li> - <li>modestr = Mode as string as returned by <code>ls -l</code></li> - <li>mtime = Last modification timestamp</li> - <li>nlink = Number of links</li> - <li>rdev = Device ID (if special file)</li> - <li>size = Size in bytes</li> - <li>type = ["reg", "dir", "chr", "blk", "fifo", "lnk", "sock"]</li> - <li>uid = User ID</li> - </ul> - - - -</dd> - - - - -<dt><a name="File.sync"></a><strong>File:sync</strong> (data_only)</dt> -<dd> - - Synchronizes the file with the storage device. - Returns when the file is successfully written to the disk. - - -<h3>Parameters</h3> -<ul> - - <li> - data_only: Do not synchronize the metadata. (optional, boolean) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls fsync() when data_only equals false - otherwise fdatasync(), on Windows _commit() is used instead. - - <li>fdatasync() is only supported by Linux and Solaris. For other systems - the <em>data_only</em> parameter is ignored and fsync() is always called. - -</ul> - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="File.tell"></a><strong>File:tell</strong> ()</dt> -<dd> - - Return the current read / write offset of the file descriptor. - - - - - -<h3>Usage:</h3> -This function calls lseek() with offset 0 from the current position. - - - -<h3>Return value:</h3> -offset position - - - -</dd> - - - - -<dt><a name="File.write"></a><strong>File:write</strong> (buffer, offset, length)</dt> -<dd> - - Write to the file descriptor. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer holding the data to be written. - </li> - - <li> - offset: Offset to start reading the buffer from. (optional) - </li> - - <li> - length: Length of chunk to read from the buffer. (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li><strong>Warning:</strong> It is not guaranteed that all data - in the buffer is written at once especially when dealing with pipes. - You have to check the return value - the number of bytes actually written - - or use the safe IO functions in the high-level IO utility module. - - <li>Unlike standard Lua indexing the lowest offset and default is 0. - -</ul> - - - -<h3>Return value:</h3> -number of bytes written - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.README.html b/documentation/api/modules/nixio.README.html deleted file mode 100644 index e140659cc7..0000000000 --- a/documentation/api/modules/nixio.README.html +++ /dev/null @@ -1,370 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li><strong>nixio.README</strong></li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio.README</code></h1> - -<p> - General Information.</p> - - - - - - - - - - -<h2>Tables</h2> -<table class="table_list"> - - <tr> - <td class="name" nowrap><a href="#Errorhandling">Errorhandling</a></td> - <td class="summary"> - General error handling information.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Functions">Functions</a></td> - <td class="summary"> - Function conventions.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Platforms">Platforms</a></td> - <td class="summary"> - Platform information.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLS-Crypto">TLS-Crypto</a></td> - <td class="summary"> - Cryptography and TLS libraries.</td> - </tr> - -</table> - - - -<br/> -<br/> - - - - -<h2><a name="tables"></a>Tables</h2> -<dl class="table"> - -<dt><a name="Errorhandling"></a><strong>Errorhandling</strong></dt> -<dd> - General error handling information. - <ul> - <li> Most of the functions available in this library may fail. If any error - occurs the function returns <strong>nil or false</strong>, an error code - (usually errno) and an additional error message text (if avaialable).</li> - <li>At the moment false is only returned when a non-blocking I/O function - fails with EAGAIN, EWOULDBLOCK or WSAEWOULDBLOCK for any others nil is - returned as first parameter. Therefore you can use false to write portable - non-blocking I/O applications.</li> - <li>Note that the function documentation does only mention the return values - in case of a successful operation.</li> - <li>You can find a table of common error numbers and other useful constants - like signal numbers in <strong>nixio.const</strong> e.g. nixio.const.EINVAL, - nixio.const.SIGTERM, etc. For portability there is a second error constant - table <strong>nixio.const_sock</strong> for socket error codes. This might - be important if you are dealing with Windows applications, on POSIX however - const_sock is just an alias for const.</li> - <li>With some exceptions - which are explicitly stated in the function - documentation - all blocking functions are signal-protected and will not fail - with EINTR.</li> - <li>On POSIX the SIGPIPE signal will be set to ignore upon initialization. - You should restore the default behaviour or set a custom signal handler - in your program after loading nixio if you need this behaviour.</li> - </ul> - - - -</dd> - - -<dt><a name="Functions"></a><strong>Functions</strong></dt> -<dd> - Function conventions. - <br />In general all functions are namend and behave like their POSIX API - counterparts - where applicable - applying the following rules: - <ul> - <li>Functions should be named like the underlying POSIX API function omitting - prefixes or suffixes - especially when placed in an object-context ( - lockf -> File:lock, fsync -> File:sync, dup2 -> dup, ...)</li> - <li>If you are unclear about the behaviour of a function you should consult - your OS API documentation (e.g. the manpages).</li> - <li>If the name is significantly different from the POSIX-function, the - underlying function(s) are stated in the documentation.</li> - <li>Parameters should reflect those of the C-API, buffer length arguments and - by-reference parameters should be omitted for practical purposes.</li> - <li>If a C function accepts a bitfield as parameter, it should be translated - into lower case string flags representing the flags if the bitfield is the - last parameter and also omitting prefixes or suffixes. (e.g. waitpid - (pid, &s, WNOHANG | WUNTRACED) -> waitpid(pid, "nohang", "untraced"), - getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) -> - Socket:getopt("socket", "reuseaddr"), etc.) </li> - <li>If it is not applicable to provide a string representation of the - bitfield a bitfield generator helper is provided. It is named FUNCTION_flags. - (open("/tmp/test", O_RDONLY | O_NONBLOCK) -> open("/tmp/test", open_flags( - "rdonly", "nonblock")))</li> - </ul> - - - -</dd> - - -<dt><a name="Platforms"></a><strong>Platforms</strong></dt> -<dd> - Platform information. - <ul> - <li>The minimum platform requirements are a decent POSIX 2001 support. - Builds are more or less tested on Linux, Solaris and FreeBSD. Builds for - Windows XP SP1 and later can be compiled with MinGW either from Windows - itself or using the MinGW cross-compiler. Earlier versions of Windows are not - supported.</li> - <li>In general all functions which don't have any remarks - in their documentation are available on all platforms.</li> - <li>Functions with a (POSIX), (Linux) or similar prefix are only available - on these specific platforms. Same appplies to parameters of functions - with a similar suffix.</li> - <li>Some functions might have limitations on some platforms. This should - be stated in the documentation. Please also consult your OS API - documentation.</li> - </ul> - - - -</dd> - - -<dt><a name="TLS-Crypto"></a><strong>TLS-Crypto</strong></dt> -<dd> - Cryptography and TLS libraries. - <ul> - <li>Currently 3 underlying cryptography libraries are supported: openssl, - cyassl and axTLS. The name of the library in use is written to - <strong>nixio.tls_provider</strong></li> - <li>You should whenever possible use openssl or cyassl as axTLS has only - limited support. It does not provide support for non-blocking sockets and - is probably less audited than the other ones.</li> - <li>As the supported Windows versions are not suitable for embedded devices - axTLS is at the moment not supported on Windows.</li> - </ul> - - - -</dd> - - -</dl> - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.Socket.html b/documentation/api/modules/nixio.Socket.html deleted file mode 100644 index 185099125d..0000000000 --- a/documentation/api/modules/nixio.Socket.html +++ /dev/null @@ -1,1029 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li><strong>nixio.Socket</strong></li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>nixio.Socket</code></h1> - -<p> - Socket Object. - Supports IPv4, IPv6 and UNIX (POSIX only) families.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#Socket.accept">Socket:accept</a> ()</td> - <td class="summary"> - Accept a connection on the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.bind">Socket:bind</a> (host, port)</td> - <td class="summary"> - Bind the socket to a network address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.close">Socket:close</a> ()</td> - <td class="summary"> - Close the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.connect">Socket:connect</a> (host, port)</td> - <td class="summary"> - Connect the socket to a network address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.fileno">Socket:fileno</a> ()</td> - <td class="summary"> - Get the number of the filedescriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.getopt">Socket:getopt</a> (level, option)</td> - <td class="summary"> - Get a socket option.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.getpeername">Socket:getpeername</a> ()</td> - <td class="summary"> - Get the peer address of a socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.getsockname">Socket:getsockname</a> ()</td> - <td class="summary"> - Get the local address of a socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.listen">Socket:listen</a> (backlog)</td> - <td class="summary"> - Listen for connections on the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.read ">Socket:read </a> (length)</td> - <td class="summary"> - Receive a message on the socket (This is an alias for recv).</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.recv ">Socket:recv </a> (length)</td> - <td class="summary"> - Receive a message on the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.recvfrom">Socket:recvfrom</a> (length)</td> - <td class="summary"> - Receive a message on the socket including the senders source address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.send">Socket:send</a> (buffer, offset, length)</td> - <td class="summary"> - Send a message on the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.sendto">Socket:sendto</a> (buffer, host, port, offset, length)</td> - <td class="summary"> - Send a message on the socket specifying the destination.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.setblocking">Socket:setblocking</a> (blocking)</td> - <td class="summary"> - Set the blocking mode of the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.setopt">Socket:setopt</a> (level, option, value)</td> - <td class="summary"> - Set a socket option.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.shutdown">Socket:shutdown</a> (how)</td> - <td class="summary"> - Shut down part of a full-duplex connection.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#Socket.write">Socket:write</a> (buffer, offset, length)</td> - <td class="summary"> - Send a message on the socket (This is an alias for send).</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="Socket.accept"></a><strong>Socket:accept</strong> ()</dt> -<dd> - - Accept a connection on the socket. - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>Socket Object - - <li>Peer IP-Address - - <li>Peer Port - -</ol> - - - -</dd> - - - - -<dt><a name="Socket.bind"></a><strong>Socket:bind</strong> (host, port)</dt> -<dd> - - Bind the socket to a network address. - - -<h3>Parameters</h3> -<ul> - - <li> - host: Host (optional, default: all addresses) - </li> - - <li> - port: Port or service description - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls getaddrinfo() and bind() but NOT listen(). - - <li>If <em>host</em> is a domain name it will be looked up and bind() - tries the IP-Addresses in the order returned by the DNS resolver - until the bind succeeds. - - <li>UNIX sockets ignore the <em>port</em>, - and interpret <em>host</em> as a socket path. - -</ul> - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.close"></a><strong>Socket:close</strong> ()</dt> -<dd> - - Close the socket. - - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.connect"></a><strong>Socket:connect</strong> (host, port)</dt> -<dd> - - Connect the socket to a network address. - - -<h3>Parameters</h3> -<ul> - - <li> - host: Hostname or IP-Address (optional, default: localhost) - </li> - - <li> - port: Port or service description - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls getaddrinfo() and connect(). - - <li>If <em>host</em> is a domain name it will be looked up and connect() - tries the IP-Addresses in the order returned by the DNS resolver - until the connect succeeds. - - <li>UNIX sockets ignore the <em>port</em>, - and interpret <em>host</em> as a socket path. - -</ul> - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.fileno"></a><strong>Socket:fileno</strong> ()</dt> -<dd> - - Get the number of the filedescriptor. - - - - - - - -<h3>Return value:</h3> -file descriptor number - - - -</dd> - - - - -<dt><a name="Socket.getopt"></a><strong>Socket:getopt</strong> (level, option)</dt> -<dd> - - Get a socket option. - - -<h3>Parameters</h3> -<ul> - - <li> - level: Level ["socket", "tcp", "ip", "ipv6"] - </li> - - <li> - option: Option ["keepalive", "reuseaddr", "sndbuf", "rcvbuf", - "priority", "broadcast", "linger", "sndtimeo", "rcvtimeo", "dontroute", - "bindtodevice", "error", "oobinline", "cork" (TCP), "nodelay" (TCP), - "mtu" (IP, IPv6), "hdrincl" (IP), "multicast_ttl" (IP), "multicast_loop" - (IP, IPv6), "multicast_if" (IP, IPv6), "v6only" (IPv6), "multicast_hops" - (IPv6), "add_membership" (IP, IPv6), "drop_membership" (IP, IPv6)] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Value - - - -</dd> - - - - -<dt><a name="Socket.getpeername"></a><strong>Socket:getpeername</strong> ()</dt> -<dd> - - Get the peer address of a socket. - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>IP-Address - - <li>Port - -</ol> - - - -</dd> - - - - -<dt><a name="Socket.getsockname"></a><strong>Socket:getsockname</strong> ()</dt> -<dd> - - Get the local address of a socket. - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>IP-Address - - <li>Port - -</ol> - - - -</dd> - - - - -<dt><a name="Socket.listen"></a><strong>Socket:listen</strong> (backlog)</dt> -<dd> - - Listen for connections on the socket. - - -<h3>Parameters</h3> -<ul> - - <li> - backlog: Length of queue for pending connections - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.read "></a><strong>Socket:read </strong> (length)</dt> -<dd> - - Receive a message on the socket (This is an alias for recv). - See the recvfrom description for more details. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Amount of data to read (in Bytes). - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -buffer containing data successfully read - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Socket.recvfrom"> - Socket:recvfrom - </a> - -</ul> - -</dd> - - - - -<dt><a name="Socket.recv "></a><strong>Socket:recv </strong> (length)</dt> -<dd> - - Receive a message on the socket. - This function is identical to recvfrom except that it does not return - the sender's source address. See the recvfrom description for more details. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Amount of data to read (in Bytes). - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -buffer containing data successfully read - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Socket.recvfrom"> - Socket:recvfrom - </a> - -</ul> - -</dd> - - - - -<dt><a name="Socket.recvfrom"></a><strong>Socket:recvfrom</strong> (length)</dt> -<dd> - - Receive a message on the socket including the senders source address. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Amount of data to read (in Bytes). - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li><strong>Warning:</strong> It is not guaranteed that all requested data - is read at once. - You have to check the return value - the length of the buffer actually read - - or use the safe IO functions in the high-level IO utility module. - - <li>The length of the return buffer is limited by the (compile time) - nixio buffersize which is <em>nixio.const.buffersize</em> (8192 by default). - Any read request greater than that will be safely truncated to this value. - -</ul> - - - -<h3>Return values:</h3> -<ol> - - <li>buffer containing data successfully read - - <li>host IP-Address of the sender - - <li>port Port of the sender - -</ol> - - - -</dd> - - - - -<dt><a name="Socket.send"></a><strong>Socket:send</strong> (buffer, offset, length)</dt> -<dd> - - Send a message on the socket. - This function is identical to sendto except for the missing destination - parameters. See the sendto description for a detailed description. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer holding the data to be written. - </li> - - <li> - offset: Offset to start reading the buffer from. (optional) - </li> - - <li> - length: Length of chunk to read from the buffer. (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number of bytes written - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Socket.sendto"> - Socket:sendto - </a> - -</ul> - -</dd> - - - - -<dt><a name="Socket.sendto"></a><strong>Socket:sendto</strong> (buffer, host, port, offset, length)</dt> -<dd> - - Send a message on the socket specifying the destination. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer holding the data to be written. - </li> - - <li> - host: Target IP-Address - </li> - - <li> - port: Target Port - </li> - - <li> - offset: Offset to start reading the buffer from. (optional) - </li> - - <li> - length: Length of chunk to read from the buffer. (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li><strong>Warning:</strong> It is not guaranteed that all data - in the buffer is written at once. - You have to check the return value - the number of bytes actually written - - or use the safe IO functions in the high-level IO utility module. - - <li>Unlike standard Lua indexing the lowest offset and default is 0. - -</ul> - - - -<h3>Return value:</h3> -number of bytes written - - - -</dd> - - - - -<dt><a name="Socket.setblocking"></a><strong>Socket:setblocking</strong> (blocking)</dt> -<dd> - - Set the blocking mode of the socket. - - -<h3>Parameters</h3> -<ul> - - <li> - blocking: (boolean) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.setopt"></a><strong>Socket:setopt</strong> (level, option, value)</dt> -<dd> - - Set a socket option. - - -<h3>Parameters</h3> -<ul> - - <li> - level: Level ["socket", "tcp", "ip", "ipv6"] - </li> - - <li> - option: Option ["keepalive", "reuseaddr", "sndbuf", "rcvbuf", - "priority", "broadcast", "linger", "sndtimeo", "rcvtimeo", "dontroute", - "bindtodevice", "error", "oobinline", "cork" (TCP), "nodelay" (TCP), - "mtu" (IP, IPv6), "hdrincl" (IP), "multicast_ttl" (IP), "multicast_loop" - (IP, IPv6), "multicast_if" (IP, IPv6), "v6only" (IPv6), "multicast_hops" - (IPv6), "add_membership" (IP, IPv6), "drop_membership" (IP, IPv6)] - </li> - - <li> - value: Value - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.shutdown"></a><strong>Socket:shutdown</strong> (how)</dt> -<dd> - - Shut down part of a full-duplex connection. - - -<h3>Parameters</h3> -<ul> - - <li> - how: (optional, default: rdwr) ["rdwr", "rd", "wr"] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="Socket.write"></a><strong>Socket:write</strong> (buffer, offset, length)</dt> -<dd> - - Send a message on the socket (This is an alias for send). - See the sendto description for a detailed description. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer holding the data to be written. - </li> - - <li> - offset: Offset to start reading the buffer from. (optional) - </li> - - <li> - length: Length of chunk to read from the buffer. (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number of bytes written - - - -<h3>See also:</h3> -<ul> - - <li><a href="#Socket.sendto"> - Socket:sendto - </a> - -</ul> - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.TLSContext.html b/documentation/api/modules/nixio.TLSContext.html deleted file mode 100644 index c84d318955..0000000000 --- a/documentation/api/modules/nixio.TLSContext.html +++ /dev/null @@ -1,475 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li><strong>nixio.TLSContext</strong></li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>nixio.TLSContext</code></h1> - -<p> - Transport Layer Security Context Object.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#TLSContext.create">TLSContext:create</a> (socket)</td> - <td class="summary"> - Create a TLS Socket from a socket descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSContext.set_cert">TLSContext:set_cert</a> (path)</td> - <td class="summary"> - Assign a PEM certificate to this context.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSContext.set_ciphers">TLSContext:set_ciphers</a> (cipherlist)</td> - <td class="summary"> - Set the available ciphers for this context.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSContext.set_key">TLSContext:set_key</a> (path)</td> - <td class="summary"> - Assign a PEM private key to this context.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSContext.set_verify">TLSContext:set_verify</a> (flag1, ...)</td> - <td class="summary"> - Set the verification flags of this context.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSContext.set_verify_depth">TLSContext:set_verify_depth</a> (depth)</td> - <td class="summary"> - Set the verification depth of this context.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="TLSContext.create"></a><strong>TLSContext:create</strong> (socket)</dt> -<dd> - - Create a TLS Socket from a socket descriptor. - - -<h3>Parameters</h3> -<ul> - - <li> - socket: Socket Object - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -TLSSocket Object - - - -</dd> - - - - -<dt><a name="TLSContext.set_cert"></a><strong>TLSContext:set_cert</strong> (path)</dt> -<dd> - - Assign a PEM certificate to this context. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Certificate File path - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls SSL_CTX_use_certificate_chain_file(). - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="TLSContext.set_ciphers"></a><strong>TLSContext:set_ciphers</strong> (cipherlist)</dt> -<dd> - - Set the available ciphers for this context. - - -<h3>Parameters</h3> -<ul> - - <li> - cipherlist: String containing a list of ciphers - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls SSL_CTX_set_cipher_list(). - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="TLSContext.set_key"></a><strong>TLSContext:set_key</strong> (path)</dt> -<dd> - - Assign a PEM private key to this context. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Private Key File path - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls SSL_CTX_use_PrivateKey_file(). - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="TLSContext.set_verify"></a><strong>TLSContext:set_verify</strong> (flag1, ...)</dt> -<dd> - - Set the verification flags of this context. - - -<h3>Parameters</h3> -<ul> - - <li> - flag1: First Flag ["none", "peer", "verify_fail_if_no_peer_cert", - "client_once"] - </li> - - <li> - ...: More Flags [-"-] - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls SSL_CTX_set_verify(). - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="TLSContext.set_verify_depth"></a><strong>TLSContext:set_verify_depth</strong> (depth)</dt> -<dd> - - Set the verification depth of this context. - - -<h3>Parameters</h3> -<ul> - - <li> - depth: Depth - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls SSL_CTX_set_verify_depth(). - - - -<h3>Return value:</h3> -true - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.TLSSocket.html b/documentation/api/modules/nixio.TLSSocket.html deleted file mode 100644 index 5d6098a9f5..0000000000 --- a/documentation/api/modules/nixio.TLSSocket.html +++ /dev/null @@ -1,571 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li><strong>nixio.TLSSocket</strong></li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>nixio.TLSSocket</code></h1> - -<p> - TLS Socket Object. - TLS Sockets contain the underlying socket and context in the fields - "socket" and "context".</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.accept">TLSSocket:accept</a> ()</td> - <td class="summary"> - Wait for a TLS handshake from a client.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.connect">TLSSocket:connect</a> ()</td> - <td class="summary"> - Initiate the TLS handshake as client with the server.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.read ">TLSSocket:read </a> (length)</td> - <td class="summary"> - Receive a message on the socket (This is an alias for recv).</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.recv">TLSSocket:recv</a> (length)</td> - <td class="summary"> - Receive a message on the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.send">TLSSocket:send</a> (buffer, offset, length)</td> - <td class="summary"> - Send a message to the socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.shutdown">TLSSocket:shutdown</a> ()</td> - <td class="summary"> - Shut down the TLS connection.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#TLSSocket.write">TLSSocket:write</a> (buffer, offset, length)</td> - <td class="summary"> - Send a message on the socket (This is an alias for send).</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="TLSSocket.accept"></a><strong>TLSSocket:accept</strong> ()</dt> -<dd> - - Wait for a TLS handshake from a client. - - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls SSL_accept(). - - <li>You have to call either connect or accept before transmitting data. - -</ul> - - - -<h3>Return value:</h3> -true - - - -<h3>See also:</h3> -<ul> - - <li><a href="#TLSSocket.connect"> - TLSSocket:connect - </a> - -</ul> - -</dd> - - - - -<dt><a name="TLSSocket.connect"></a><strong>TLSSocket:connect</strong> ()</dt> -<dd> - - Initiate the TLS handshake as client with the server. - - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls SSL_connect(). - - <li>You have to call either connect or accept before transmitting data. - -</ul> - - - -<h3>Return value:</h3> -true - - - -<h3>See also:</h3> -<ul> - - <li><a href="#TLSSocket.accept"> - TLSSocket:accept - </a> - -</ul> - -</dd> - - - - -<dt><a name="TLSSocket.read "></a><strong>TLSSocket:read </strong> (length)</dt> -<dd> - - Receive a message on the socket (This is an alias for recv). - See the recv description for more details. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Amount of data to read (in Bytes). - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -buffer containing data successfully read - - - -<h3>See also:</h3> -<ul> - - <li><a href="#TLSSocket.recv"> - TLSSocket:recv - </a> - -</ul> - -</dd> - - - - -<dt><a name="TLSSocket.recv"></a><strong>TLSSocket:recv</strong> (length)</dt> -<dd> - - Receive a message on the socket. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Amount of data to read (in Bytes). - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls SSL_read(). - - <li><strong>Warning:</strong> It is not guaranteed that all requested data - is read at once. - You have to check the return value - the length of the buffer actually read - - or use the safe IO functions in the high-level IO utility module. - - <li>The length of the return buffer is limited by the (compile time) - nixio buffersize which is <em>nixio.const.buffersize</em> (8192 by default). - Any read request greater than that will be safely truncated to this value. - -</ul> - - - -<h3>Return value:</h3> -buffer containing data successfully read - - - -</dd> - - - - -<dt><a name="TLSSocket.send"></a><strong>TLSSocket:send</strong> (buffer, offset, length)</dt> -<dd> - - Send a message to the socket. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer holding the data to be written. - </li> - - <li> - offset: Offset to start reading the buffer from. (optional) - </li> - - <li> - length: Length of chunk to read from the buffer. (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function calls SSL_write(). - - <li><strong>Warning:</strong> It is not guaranteed that all data - in the buffer is written at once. - You have to check the return value - the number of bytes actually written - - or use the safe IO functions in the high-level IO utility module. - - <li>Unlike standard Lua indexing the lowest offset and default is 0. - -</ul> - - - -<h3>Return value:</h3> -number of bytes written - - - -</dd> - - - - -<dt><a name="TLSSocket.shutdown"></a><strong>TLSSocket:shutdown</strong> ()</dt> -<dd> - - Shut down the TLS connection. - - - - - -<h3>Usage:</h3> -This function calls SSL_shutdown(). - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="TLSSocket.write"></a><strong>TLSSocket:write</strong> (buffer, offset, length)</dt> -<dd> - - Send a message on the socket (This is an alias for send). - See the send description for a detailed description. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer holding the data to be written. - </li> - - <li> - offset: Offset to start reading the buffer from. (optional) - </li> - - <li> - length: Length of chunk to read from the buffer. (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number of bytes written - - - -<h3>See also:</h3> -<ul> - - <li><a href="#TLSSocket.send"> - TLSSocket:send - </a> - -</ul> - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.UnifiedIO.html b/documentation/api/modules/nixio.UnifiedIO.html deleted file mode 100644 index 6410ffb42e..0000000000 --- a/documentation/api/modules/nixio.UnifiedIO.html +++ /dev/null @@ -1,763 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li><strong>nixio.UnifiedIO</strong></li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Object Instance <code>nixio.UnifiedIO</code></h1> - -<p> - Unified high-level I/O utility API for Files, Sockets and TLS-Sockets. - These functions are added to the object function tables by doing <strong> - require "nixio.util"</strong>, can be used on all nixio IO Descriptors and - are based on the shared low-level read() and write() functions.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.blocksource">UnifiedIO:blocksource</a> (blocksize, limit)</td> - <td class="summary"> - Create a block-based iterator.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.close">UnifiedIO:close</a> ()</td> - <td class="summary"> - Close the descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.copy">UnifiedIO:copy</a> (fdout, size)</td> - <td class="summary"> - Copy data from the current descriptor to another one.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.copyz">UnifiedIO:copyz</a> (fdout, size)</td> - <td class="summary"> - Copy data from the current descriptor to another one using kernel-space - copying if possible.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.is_file">UnifiedIO:is_file</a> ()</td> - <td class="summary"> - Test whether the I/O-Descriptor is a file.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.is_socket">UnifiedIO:is_socket</a> ()</td> - <td class="summary"> - Test whether the I/O-Descriptor is a socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.is_tls_socket">UnifiedIO:is_tls_socket</a> ()</td> - <td class="summary"> - Test whether the I/O-Descriptor is a TLS socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.linesource">UnifiedIO:linesource</a> (limit)</td> - <td class="summary"> - Create a line-based iterator.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.readall">UnifiedIO:readall</a> (length)</td> - <td class="summary"> - Read a block of data and wait until all data is available.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.sink">UnifiedIO:sink</a> (close_when_done)</td> - <td class="summary"> - Create a sink.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#UnifiedIO.writeall">UnifiedIO:writeall</a> (block)</td> - <td class="summary"> - Write a block of data and wait until all data is written.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="UnifiedIO.blocksource"></a><strong>UnifiedIO:blocksource</strong> (blocksize, limit)</dt> -<dd> - - Create a block-based iterator. - - -<h3>Parameters</h3> -<ul> - - <li> - blocksize: Advisory blocksize (optional) - </li> - - <li> - limit: Amount of data to consume (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the low-level read function of the descriptor. - - <li>The blocksize given is only advisory and to be seen as an upper limit, - if an underlying read returns less bytes the chunk is nevertheless returned. - - <li>If the limit parameter is omitted, the iterator returns data - until an end-of-file, end-of-stream, connection shutdown or similar happens. - - <li>The iterator will not buffer so it is safe to mix with calls to read. - - <li>If the descriptor is non-blocking the iterator may fail with EAGAIN. - - <li>The iterator can be used as an LTN12 source. - -</ul> - - - -<h3>Return value:</h3> -Block-based Iterator - - - -</dd> - - - - -<dt><a name="UnifiedIO.close"></a><strong>UnifiedIO:close</strong> ()</dt> -<dd> - - Close the descriptor. - - - - - -<h3>Usage:</h3> -If the descriptor is a TLS-socket the underlying descriptor is - closed without touching the TLS connection. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="UnifiedIO.copy"></a><strong>UnifiedIO:copy</strong> (fdout, size)</dt> -<dd> - - Copy data from the current descriptor to another one. - - -<h3>Parameters</h3> -<ul> - - <li> - fdout: Target Descriptor - </li> - - <li> - size: Bytes to copy (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the blocksource function of the source descriptor - and the sink function of the target descriptor. - - <li>If the limit parameter is omitted, data is copied - until an end-of-file, end-of-stream, connection shutdown or similar happens. - - <li>If the descriptor is non-blocking the function may fail with EAGAIN. - -</ul> - - - -<h3>Return values:</h3> -<ol> - - <li>bytes that were successfully written if no error occurred - - <li>- reserved for error code - - - <li>- reserved for error message - - - <li>bytes that were successfully written even if an error occurred - -</ol> - - - -</dd> - - - - -<dt><a name="UnifiedIO.copyz"></a><strong>UnifiedIO:copyz</strong> (fdout, size)</dt> -<dd> - - Copy data from the current descriptor to another one using kernel-space - copying if possible. - - -<h3>Parameters</h3> -<ul> - - <li> - fdout: Target Descriptor - </li> - - <li> - size: Bytes to copy (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the sendfile() syscall to copy the data or the - blocksource function of the source descriptor and the sink function - of the target descriptor as a fallback mechanism. - - <li>If the limit parameter is omitted, data is copied - until an end-of-file, end-of-stream, connection shutdown or similar happens. - - <li>If the descriptor is non-blocking the function may fail with EAGAIN. - -</ul> - - - -<h3>Return values:</h3> -<ol> - - <li>bytes that were successfully written if no error occurred - - <li>- reserved for error code - - - <li>- reserved for error message - - - <li>bytes that were successfully written even if an error occurred - -</ol> - - - -</dd> - - - - -<dt><a name="UnifiedIO.is_file"></a><strong>UnifiedIO:is_file</strong> ()</dt> -<dd> - - Test whether the I/O-Descriptor is a file. - - - - - - - -<h3>Return value:</h3> -boolean - - - -</dd> - - - - -<dt><a name="UnifiedIO.is_socket"></a><strong>UnifiedIO:is_socket</strong> ()</dt> -<dd> - - Test whether the I/O-Descriptor is a socket. - - - - - - - -<h3>Return value:</h3> -boolean - - - -</dd> - - - - -<dt><a name="UnifiedIO.is_tls_socket"></a><strong>UnifiedIO:is_tls_socket</strong> ()</dt> -<dd> - - Test whether the I/O-Descriptor is a TLS socket. - - - - - - - -<h3>Return value:</h3> -boolean - - - -</dd> - - - - -<dt><a name="UnifiedIO.linesource"></a><strong>UnifiedIO:linesource</strong> (limit)</dt> -<dd> - - Create a line-based iterator. - Lines may end with either \n or \r\n, these control chars are not included - in the return value. - - -<h3>Parameters</h3> -<ul> - - <li> - limit: Line limit - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the low-level read function of the descriptor. - - <li><strong>Note:</strong> This function uses an internal buffer to read - ahead. Do NOT mix calls to read(all) and the returned iterator. If you want - to stop reading line-based and want to use the read(all) functions instead - you can pass "true" to the iterator which will flush the buffer - and return the bufferd data. - - <li>If the limit parameter is omitted, this function uses the nixio - buffersize (8192B by default). - - <li>If the descriptor is non-blocking the iterator may fail with EAGAIN. - - <li>The iterator can be used as an LTN12 source. - -</ul> - - - -<h3>Return value:</h3> -Line-based Iterator - - - -</dd> - - - - -<dt><a name="UnifiedIO.readall"></a><strong>UnifiedIO:readall</strong> (length)</dt> -<dd> - - Read a block of data and wait until all data is available. - - -<h3>Parameters</h3> -<ul> - - <li> - length: Bytes to read (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the low-level read function of the descriptor. - - <li>If the length parameter is omitted, this function returns all data - that can be read before an end-of-file, end-of-stream, connection shutdown - or similar happens. - - <li>If the descriptor is non-blocking this function may fail with EAGAIN. - -</ul> - - - -<h3>Return values:</h3> -<ol> - - <li>data that was successfully read if no error occurred - - <li>- reserved for error code - - - <li>- reserved for error message - - - <li>data that was successfully read even if an error occurred - -</ol> - - - -</dd> - - - - -<dt><a name="UnifiedIO.sink"></a><strong>UnifiedIO:sink</strong> (close_when_done)</dt> -<dd> - - Create a sink. - This sink will simply write all data that it receives and optionally - close the descriptor afterwards. - - -<h3>Parameters</h3> -<ul> - - <li> - close_when_done: (optional, boolean) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the writeall function of the descriptor. - - <li>If the descriptor is non-blocking the sink may fail with EAGAIN. - - <li>The iterator can be used as an LTN12 sink. - -</ul> - - - -<h3>Return value:</h3> -Sink - - - -</dd> - - - - -<dt><a name="UnifiedIO.writeall"></a><strong>UnifiedIO:writeall</strong> (block)</dt> -<dd> - - Write a block of data and wait until all data is written. - - -<h3>Parameters</h3> -<ul> - - <li> - block: Bytes to write - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function uses the low-level write function of the descriptor. - - <li>If the descriptor is non-blocking this function may fail with EAGAIN. - -</ul> - - - -<h3>Return values:</h3> -<ol> - - <li>bytes that were successfully written if no error occurred - - <li>- reserved for error code - - - <li>- reserved for error message - - - <li>bytes that were successfully written even if an error occurred - -</ol> - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.bin.html b/documentation/api/modules/nixio.bin.html deleted file mode 100644 index 48e6fcd8b8..0000000000 --- a/documentation/api/modules/nixio.bin.html +++ /dev/null @@ -1,423 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li><strong>nixio.bin</strong></li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio.bin</code></h1> - -<p> - Binary operations and conversion.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#b64decode">b64decode</a> (buffer)</td> - <td class="summary"> - Base64 decode a given buffer.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#b64encode">b64encode</a> (buffer)</td> - <td class="summary"> - Base64 encode a given buffer.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#crc32">crc32</a> (buffer, initial)</td> - <td class="summary"> - Calculate the CRC32 value of a buffer.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#hexlify">hexlify</a> (buffer)</td> - <td class="summary"> - Return a hexadecimal ASCII represantation of the content of a buffer.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#unhexlify">unhexlify</a> (hexvalue)</td> - <td class="summary"> - Return a binary buffer from a hexadecimal ASCII representation.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="b64decode"></a><strong>b64decode</strong> (buffer)</dt> -<dd> - - Base64 decode a given buffer. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Base 64 Encoded data - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -binary data - - - -</dd> - - - - -<dt><a name="b64encode"></a><strong>b64encode</strong> (buffer)</dt> -<dd> - - Base64 encode a given buffer. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -base64 encoded buffer - - - -</dd> - - - - -<dt><a name="crc32"></a><strong>crc32</strong> (buffer, initial)</dt> -<dd> - - Calculate the CRC32 value of a buffer. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer - </li> - - <li> - initial: Initial CRC32 value (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -crc32 value - - - -</dd> - - - - -<dt><a name="hexlify"></a><strong>hexlify</strong> (buffer)</dt> -<dd> - - Return a hexadecimal ASCII represantation of the content of a buffer. - - -<h3>Parameters</h3> -<ul> - - <li> - buffer: Buffer - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -representation using characters [0-9a-f] - - - -</dd> - - - - -<dt><a name="unhexlify"></a><strong>unhexlify</strong> (hexvalue)</dt> -<dd> - - Return a binary buffer from a hexadecimal ASCII representation. - - -<h3>Parameters</h3> -<ul> - - <li> - hexvalue: representation using characters [0-9a-f] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -binary data - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.bit.html b/documentation/api/modules/nixio.bit.html deleted file mode 100644 index 419736363c..0000000000 --- a/documentation/api/modules/nixio.bit.html +++ /dev/null @@ -1,740 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li><strong>nixio.bit</strong></li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio.bit</code></h1> - -<p> - Bitfield operators and mainpulation functions. - Can be used as a drop-in replacement for bitlib.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#arshift">arshift</a> (oper, shift)</td> - <td class="summary"> - Arithmetically right shift a number.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#band">band</a> (oper1, oper2, ...)</td> - <td class="summary"> - Bitwise AND several numbers.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#bnot">bnot</a> (oper)</td> - <td class="summary"> - Invert given number.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#bor">bor</a> (oper1, oper2, ...)</td> - <td class="summary"> - Bitwise OR several numbers.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#bxor">bxor</a> (oper1, oper2, ...)</td> - <td class="summary"> - Bitwise XOR several numbers.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#cast">cast</a> (oper)</td> - <td class="summary"> - Cast a number to the bit-operating range.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#check">check</a> (bitfield, flag1, ...)</td> - <td class="summary"> - Checks whether given flags are set in a bitfield.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#div">div</a> (oper1, oper2, ...)</td> - <td class="summary"> - Integer division of 2 or more numbers.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#lshift">lshift</a> (oper, shift)</td> - <td class="summary"> - Left shift a number.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#rshift">rshift</a> (oper, shift)</td> - <td class="summary"> - Right shift a number.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#set">set</a> (bitfield, flag1, ...)</td> - <td class="summary"> - Sets one or more flags of a bitfield.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#unset">unset</a> (bitfield, flag1, ...)</td> - <td class="summary"> - Unsets one or more flags of a bitfield.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="arshift"></a><strong>arshift</strong> (oper, shift)</dt> -<dd> - - Arithmetically right shift a number. - - -<h3>Parameters</h3> -<ul> - - <li> - oper: number - </li> - - <li> - shift: bits to shift - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="band"></a><strong>band</strong> (oper1, oper2, ...)</dt> -<dd> - - Bitwise AND several numbers. - - -<h3>Parameters</h3> -<ul> - - <li> - oper1: First Operand - </li> - - <li> - oper2: Second Operand - </li> - - <li> - ...: More Operands - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="bnot"></a><strong>bnot</strong> (oper)</dt> -<dd> - - Invert given number. - - -<h3>Parameters</h3> -<ul> - - <li> - oper: Operand - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="bor"></a><strong>bor</strong> (oper1, oper2, ...)</dt> -<dd> - - Bitwise OR several numbers. - - -<h3>Parameters</h3> -<ul> - - <li> - oper1: First Operand - </li> - - <li> - oper2: Second Operand - </li> - - <li> - ...: More Operands - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="bxor"></a><strong>bxor</strong> (oper1, oper2, ...)</dt> -<dd> - - Bitwise XOR several numbers. - - -<h3>Parameters</h3> -<ul> - - <li> - oper1: First Operand - </li> - - <li> - oper2: Second Operand - </li> - - <li> - ...: More Operands - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="cast"></a><strong>cast</strong> (oper)</dt> -<dd> - - Cast a number to the bit-operating range. - - -<h3>Parameters</h3> -<ul> - - <li> - oper: number - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="check"></a><strong>check</strong> (bitfield, flag1, ...)</dt> -<dd> - - Checks whether given flags are set in a bitfield. - - -<h3>Parameters</h3> -<ul> - - <li> - bitfield: Bitfield - </li> - - <li> - flag1: First Flag - </li> - - <li> - ...: More Flags - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true when all flags are set, otherwise false - - - -</dd> - - - - -<dt><a name="div"></a><strong>div</strong> (oper1, oper2, ...)</dt> -<dd> - - Integer division of 2 or more numbers. - - -<h3>Parameters</h3> -<ul> - - <li> - oper1: Operand 1 - </li> - - <li> - oper2: Operand 2 - </li> - - <li> - ...: More Operands - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="lshift"></a><strong>lshift</strong> (oper, shift)</dt> -<dd> - - Left shift a number. - - -<h3>Parameters</h3> -<ul> - - <li> - oper: number - </li> - - <li> - shift: bits to shift - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="rshift"></a><strong>rshift</strong> (oper, shift)</dt> -<dd> - - Right shift a number. - - -<h3>Parameters</h3> -<ul> - - <li> - oper: number - </li> - - <li> - shift: bits to shift - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -number - - - -</dd> - - - - -<dt><a name="set"></a><strong>set</strong> (bitfield, flag1, ...)</dt> -<dd> - - Sets one or more flags of a bitfield. - - -<h3>Parameters</h3> -<ul> - - <li> - bitfield: Bitfield - </li> - - <li> - flag1: First Flag - </li> - - <li> - ...: More Flags - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -altered bitfield - - - -</dd> - - - - -<dt><a name="unset"></a><strong>unset</strong> (bitfield, flag1, ...)</dt> -<dd> - - Unsets one or more flags of a bitfield. - - -<h3>Parameters</h3> -<ul> - - <li> - bitfield: Bitfield - </li> - - <li> - flag1: First Flag - </li> - - <li> - ...: More Flags - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -altered bitfield - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.crypto.html b/documentation/api/modules/nixio.crypto.html deleted file mode 100644 index b91fe28c1d..0000000000 --- a/documentation/api/modules/nixio.crypto.html +++ /dev/null @@ -1,315 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li><strong>nixio.crypto</strong></li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio.crypto</code></h1> - -<p> - Cryptographical library.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#nixio.crypto.hash">hash</a> (algo)</td> - <td class="summary"> - Create a hash object.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.crypto.hmac">hmac</a> (algo, key)</td> - <td class="summary"> - Create a HMAC object.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="nixio.crypto.hash"></a><strong>hash</strong> (algo)</dt> -<dd> - - Create a hash object. - - -<h3>Parameters</h3> -<ul> - - <li> - algo: Algorithm ["sha1", "md5"] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -CryptoHash Object - - - -</dd> - - - - -<dt><a name="nixio.crypto.hmac"></a><strong>hmac</strong> (algo, key)</dt> -<dd> - - Create a HMAC object. - - -<h3>Parameters</h3> -<ul> - - <li> - algo: Algorithm ["sha1", "md5"] - </li> - - <li> - key: HMAC-Key - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -CryptoHash Object - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.fs.html b/documentation/api/modules/nixio.fs.html deleted file mode 100644 index c9d34591c2..0000000000 --- a/documentation/api/modules/nixio.fs.html +++ /dev/null @@ -1,1558 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li> - <a href="../modules/nixio.html">nixio</a> - </li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li><strong>nixio.fs</strong></li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio.fs</code></h1> - -<p> - Low-level and high-level filesystem manipulation library.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.access">access</a> (path, mode1, ...)</td> - <td class="summary"> - Check user's permission on a file.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.basename">basename</a> (path)</td> - <td class="summary"> - Strip the directory part from a path.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.chmod">chmod</a> (path, mode)</td> - <td class="summary"> - Change the file mode.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.chown">chown</a> (path, user, group)</td> - <td class="summary"> - (POSIX) Change owner and group of a file.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.copy">copy</a> (src, dest)</td> - <td class="summary"> - Copy a file, directory or symlink non-recursively preserving file mode, - timestamps, owner and group.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.copyr">copyr</a> (src, dest)</td> - <td class="summary"> - Copy a file, directory or symlink recursively preserving file mode, - timestamps, owner and group.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.datacopy">datacopy</a> (src, dest, limit)</td> - <td class="summary"> - Copy data between files.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.dir">dir</a> (path)</td> - <td class="summary"> - Iterate over the entries of a directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.dirname">dirname</a> (path)</td> - <td class="summary"> - Strip the base from a path.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.glob">glob</a> (pattern)</td> - <td class="summary"> - (POSIX) Find pathnames matching a pattern.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.lchown">lchown</a> (path, user, group)</td> - <td class="summary"> - (POSIX) Change owner and group of a file and do not resolve - if target is a symlink.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.link">link</a> (oldpath, newpath)</td> - <td class="summary"> - Create a hard link.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.lstat">lstat</a> (path, field)</td> - <td class="summary"> - Get file status and attributes and do not resolve if target is a symlink.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.mkdir">mkdir</a> (path, mode)</td> - <td class="summary"> - Create a new directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.mkdirr">mkdirr</a> (dest, mode)</td> - <td class="summary"> - Create a directory and all needed parent directories recursively.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.mkfifo">mkfifo</a> (path, mode)</td> - <td class="summary"> - (POSIX) Create a FIFO (named pipe).</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.move">move</a> (src, dest)</td> - <td class="summary"> - Rename a file, directory or symlink non-recursively across filesystems.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.mover">mover</a> (src, dest)</td> - <td class="summary"> - Rename a file, directory or symlink recursively across filesystems.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.readfile">readfile</a> (path, limit)</td> - <td class="summary"> - Read the contents of a file into a buffer.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.readlink">readlink</a> (path)</td> - <td class="summary"> - (POSIX) Read the target of a symbolic link.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.realpath">realpath</a> (path)</td> - <td class="summary"> - Return the cannonicalized absolute pathname.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.remove">remove</a> (path)</td> - <td class="summary"> - Remove a file or directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.rename">rename</a> (src, dest)</td> - <td class="summary"> - Renames a file or directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.rmdir">rmdir</a> (path)</td> - <td class="summary"> - Remove an empty directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.stat">stat</a> (path, field)</td> - <td class="summary"> - Get file status and attributes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.statvfs">statvfs</a> (path)</td> - <td class="summary"> - (POSIX) Get filesystem statistics.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.symlink">symlink</a> (oldpath, newpath)</td> - <td class="summary"> - (POSIX) Create a symbolic link.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.unlink">unlink</a> (path)</td> - <td class="summary"> - Delete a name and - if no links are left - the associated file.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.utimes">utimes</a> (path, actime, mtime)</td> - <td class="summary"> - Change file last access and last modification time.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fs.writefile">writefile</a> (path, data)</td> - <td class="summary"> - Write a buffer into a file truncating the file first.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="nixio.fs.access"></a><strong>access</strong> (path, mode1, ...)</dt> -<dd> - - Check user's permission on a file. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - mode1: First Mode to check ["f", "r", "w", "x"] - </li> - - <li> - ...: More Modes to check [-"-] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.basename"></a><strong>basename</strong> (path)</dt> -<dd> - - Strip the directory part from a path. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function cannot fail and will never return nil. - - - -<h3>Return value:</h3> -basename - - - -</dd> - - - - -<dt><a name="nixio.fs.chmod"></a><strong>chmod</strong> (path, mode)</dt> -<dd> - - Change the file mode. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - mode: File mode - [decimal mode number, "[-r][-w][-xsS][-r][-w][-xsS][-r][-w][-xtT]"] - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>Windows only supports setting the write-protection through the - "Writable to others" bit. - - <li><strong>Notice:</strong> The mode-flag for the functions - open, mkdir, mkfifo are affected by the umask. - -</ul> - - - -<h3>Return value:</h3> -true - - - -<h3>See also:</h3> -<ul> - - <li><a href=""> - umask - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.fs.chown"></a><strong>chown</strong> (path, user, group)</dt> -<dd> - - (POSIX) Change owner and group of a file. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - user: User ID or Username (optional) - </li> - - <li> - group: Group ID or Groupname (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.copy"></a><strong>copy</strong> (src, dest)</dt> -<dd> - - Copy a file, directory or symlink non-recursively preserving file mode, - timestamps, owner and group. - - -<h3>Parameters</h3> -<ul> - - <li> - src: Source path - </li> - - <li> - dest: Destination path - </li> - -</ul> - - - - -<h3>Usage:</h3> -The destination must always be a full destination path e.g. do not - omit the basename even if source and destination basename are equal. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.copyr"></a><strong>copyr</strong> (src, dest)</dt> -<dd> - - Copy a file, directory or symlink recursively preserving file mode, - timestamps, owner and group. - - -<h3>Parameters</h3> -<ul> - - <li> - src: Source path - </li> - - <li> - dest: Destination path - </li> - -</ul> - - - - -<h3>Usage:</h3> -The destination must always be a full destination path e.g. do not - omit the basename even if source and destination basename are equal. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.datacopy"></a><strong>datacopy</strong> (src, dest, limit)</dt> -<dd> - - Copy data between files. - - -<h3>Parameters</h3> -<ul> - - <li> - src: Source file path - </li> - - <li> - dest: Destination file path - </li> - - <li> - limit: Maximum bytes to copy (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.dir"></a><strong>dir</strong> (path)</dt> -<dd> - - Iterate over the entries of a directory. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - -<h3>Usage:</h3> -The special entries "." and ".." are omitted. - - - -<h3>Return value:</h3> -directory iterator returning one entry per call - - - -</dd> - - - - -<dt><a name="nixio.fs.dirname"></a><strong>dirname</strong> (path)</dt> -<dd> - - Strip the base from a path. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function cannot fail and will never return nil. - - - -<h3>Return value:</h3> -dirname - - - -</dd> - - - - -<dt><a name="nixio.fs.glob"></a><strong>glob</strong> (pattern)</dt> -<dd> - - (POSIX) Find pathnames matching a pattern. - - -<h3>Parameters</h3> -<ul> - - <li> - pattern: Pattern - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>path iterator - - <li>number of matches - -</ol> - - - -</dd> - - - - -<dt><a name="nixio.fs.lchown"></a><strong>lchown</strong> (path, user, group)</dt> -<dd> - - (POSIX) Change owner and group of a file and do not resolve - if target is a symlink. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - user: User ID or Username (optional) - </li> - - <li> - group: Group ID or Groupname (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.link"></a><strong>link</strong> (oldpath, newpath)</dt> -<dd> - - Create a hard link. - - -<h3>Parameters</h3> -<ul> - - <li> - oldpath: Path - </li> - - <li> - newpath: Path - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function calls link() on POSIX and CreateHardLink() on Windows. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.lstat"></a><strong>lstat</strong> (path, field)</dt> -<dd> - - Get file status and attributes and do not resolve if target is a symlink. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - field: Only return a specific field, not the whole table (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing attributes (see stat for a detailed description) - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.fs.stat"> - stat - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.fs.mkdir"></a><strong>mkdir</strong> (path, mode)</dt> -<dd> - - Create a new directory. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - mode: File mode (optional, see chmod and umask) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.fs.chmod"> - chmod - </a> - - <li><a href=""> - umask - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.fs.mkdirr"></a><strong>mkdirr</strong> (dest, mode)</dt> -<dd> - - Create a directory and all needed parent directories recursively. - - -<h3>Parameters</h3> -<ul> - - <li> - dest: Destination path - </li> - - <li> - mode: File mode (optional, see chmod and umask) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.fs.chmod"> - chmod - </a> - - <li><a href=""> - umask - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.fs.mkfifo"></a><strong>mkfifo</strong> (path, mode)</dt> -<dd> - - (POSIX) Create a FIFO (named pipe). - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - mode: File mode (optional, see chmod and umask) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.fs.chmod"> - chmod - </a> - - <li><a href=""> - umask - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.fs.move"></a><strong>move</strong> (src, dest)</dt> -<dd> - - Rename a file, directory or symlink non-recursively across filesystems. - - -<h3>Parameters</h3> -<ul> - - <li> - src: Source path - </li> - - <li> - dest: Destination path - </li> - -</ul> - - - - -<h3>Usage:</h3> -The destination must always be a full destination path e.g. do not - omit the basename even if source and destination basename are equal. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.mover"></a><strong>mover</strong> (src, dest)</dt> -<dd> - - Rename a file, directory or symlink recursively across filesystems. - - -<h3>Parameters</h3> -<ul> - - <li> - src: Source path - </li> - - <li> - dest: Destination path - </li> - -</ul> - - - - -<h3>Usage:</h3> -The destination must always be a full destination path e.g. do not - omit the basename even if source and destination basename are equal. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.readfile"></a><strong>readfile</strong> (path, limit)</dt> -<dd> - - Read the contents of a file into a buffer. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - limit: Maximum bytes to read (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -file contents - - - -</dd> - - - - -<dt><a name="nixio.fs.readlink"></a><strong>readlink</strong> (path)</dt> -<dd> - - (POSIX) Read the target of a symbolic link. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -target path - - - -</dd> - - - - -<dt><a name="nixio.fs.realpath"></a><strong>realpath</strong> (path)</dt> -<dd> - - Return the cannonicalized absolute pathname. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -absolute path - - - -</dd> - - - - -<dt><a name="nixio.fs.remove"></a><strong>remove</strong> (path)</dt> -<dd> - - Remove a file or directory. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.rename"></a><strong>rename</strong> (src, dest)</dt> -<dd> - - Renames a file or directory. - - -<h3>Parameters</h3> -<ul> - - <li> - src: Source path - </li> - - <li> - dest: Destination path - </li> - -</ul> - - - - -<h3>Usage:</h3> -It is normally not possible to rename files across filesystems. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.rmdir"></a><strong>rmdir</strong> (path)</dt> -<dd> - - Remove an empty directory. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.stat"></a><strong>stat</strong> (path, field)</dt> -<dd> - - Get file status and attributes. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - field: Only return a specific field, not the whole table (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>atime = Last access timestamp</li> - <li>blksize = Blocksize (POSIX only)</li> - <li>blocks = Blocks used (POSIX only)</li> - <li>ctime = Creation timestamp</li> - <li>dev = Device ID</li> - <li>gid = Group ID</li> - <li>ino = Inode</li> - <li>modedec = Mode converted into a decimal number</li> - <li>modestr = Mode as string as returned by <code>ls -l</code></li> - <li>mtime = Last modification timestamp</li> - <li>nlink = Number of links</li> - <li>rdev = Device ID (if special file)</li> - <li>size = Size in bytes</li> - <li>type = ["reg", "dir", "chr", "blk", "fifo", "lnk", "sock"]</li> - <li>uid = User ID</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.fs.statvfs"></a><strong>statvfs</strong> (path)</dt> -<dd> - - (POSIX) Get filesystem statistics. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path to any file within the filesystem. - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>bavail = available blocks</li> - <li>bfree = free blocks</li> - <li>blocks = number of fragments</li> - <li>frsize = fragment size</li> - <li>favail = available inodes</li> - <li>ffree = free inodes</li> - <li>files = inodes</li> - <li>flag = flags</li> - <li>fsid = filesystem ID</li> - <li>namemax = maximum filename length</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.fs.symlink"></a><strong>symlink</strong> (oldpath, newpath)</dt> -<dd> - - (POSIX) Create a symbolic link. - - -<h3>Parameters</h3> -<ul> - - <li> - oldpath: Path - </li> - - <li> - newpath: Path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.unlink"></a><strong>unlink</strong> (path)</dt> -<dd> - - Delete a name and - if no links are left - the associated file. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.utimes"></a><strong>utimes</strong> (path, actime, mtime)</dt> -<dd> - - Change file last access and last modification time. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - actime: Last access timestamp (optional, default: current time) - </li> - - <li> - mtime: Last modification timestamp (optional, default: actime) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.fs.writefile"></a><strong>writefile</strong> (path, data)</dt> -<dd> - - Write a buffer into a file truncating the file first. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Path - </li> - - <li> - data: Data to write - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> diff --git a/documentation/api/modules/nixio.html b/documentation/api/modules/nixio.html deleted file mode 100644 index bf93619c91..0000000000 --- a/documentation/api/modules/nixio.html +++ /dev/null @@ -1,2401 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <title>Reference</title> - <link rel="stylesheet" href="../luadoc.css" type="text/css" /> - <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> -</head> - -<body> -<div id="container"> - -<div id="product"> - <div id="product_logo"></div> - <div id="product_name"><big><b></b></big></div> - <div id="product_description"></div> -</div> <!-- id="product" --> - -<div id="main"> - -<div id="navigation"> - - -<h1>LuaDoc</h1> -<ul> - - <li><a href="../index.html">Index</a></li> - -</ul> - - -<!-- Module list --> - -<h1>Modules</h1> -<ul> - - <li> - <a href="../modules/luci.dispatcher.html">luci.dispatcher</a> - </li> - - <li> - <a href="../modules/luci.http.html">luci.http</a> - </li> - - <li> - <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a> - </li> - - <li> - <a href="../modules/luci.http.date.html">luci.http.date</a> - </li> - - <li> - <a href="../modules/luci.http.mime.html">luci.http.mime</a> - </li> - - <li> - <a href="../modules/luci.i18n.html">luci.i18n</a> - </li> - - <li> - <a href="../modules/luci.ip.html">luci.ip</a> - </li> - - <li> - <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a> - </li> - - <li> - <a href="../modules/luci.json.html">luci.json</a> - </li> - - <li> - <a href="../modules/luci.jsonc.html">luci.jsonc</a> - </li> - - <li> - <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a> - </li> - - <li> - <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a> - </li> - - <li> - <a href="../modules/luci.model.uci.html">luci.model.uci</a> - </li> - - <li> - <a href="../modules/luci.rpcc.html">luci.rpcc</a> - </li> - - <li> - <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a> - </li> - - <li> - <a href="../modules/luci.sys.html">luci.sys</a> - </li> - - <li> - <a href="../modules/luci.sys.init.html">luci.sys.init</a> - </li> - - <li> - <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a> - </li> - - <li> - <a href="../modules/luci.sys.net.html">luci.sys.net</a> - </li> - - <li> - <a href="../modules/luci.sys.process.html">luci.sys.process</a> - </li> - - <li> - <a href="../modules/luci.sys.user.html">luci.sys.user</a> - </li> - - <li> - <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a> - </li> - - <li> - <a href="../modules/luci.util.html">luci.util</a> - </li> - - <li><strong>nixio</strong></li> - - <li> - <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a> - </li> - - <li> - <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a> - </li> - - <li> - <a href="../modules/nixio.File.html">nixio.File</a> - </li> - - <li> - <a href="../modules/nixio.README.html">nixio.README</a> - </li> - - <li> - <a href="../modules/nixio.Socket.html">nixio.Socket</a> - </li> - - <li> - <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a> - </li> - - <li> - <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a> - </li> - - <li> - <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a> - </li> - - <li> - <a href="../modules/nixio.bin.html">nixio.bin</a> - </li> - - <li> - <a href="../modules/nixio.bit.html">nixio.bit</a> - </li> - - <li> - <a href="../modules/nixio.crypto.html">nixio.crypto</a> - </li> - - <li> - <a href="../modules/nixio.fs.html">nixio.fs</a> - </li> - -</ul> - - - -<!-- File list --> - - - - - - - -</div><!-- id="navigation" --> - -<div id="content"> - -<h1>Class <code>nixio</code></h1> - -<p> - General POSIX IO library.</p> - - - - - - - -<h2>Functions</h2> -<table class="function_list"> - - <tr> - <td class="name" nowrap><a href="#nixio.bind">bind</a> (host, port, family, socktype)</td> - <td class="summary"> - Create a new socket and bind it to a network address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.chdir">chdir</a> (path)</td> - <td class="summary"> - Change the working directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.closelog">closelog</a> ()</td> - <td class="summary"> - (POSIX) Close the connection to the system logger.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.connect">connect</a> (host, port, family, socktype)</td> - <td class="summary"> - Create a new socket and connect to a network address.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.crypt">crypt</a> (key, salt)</td> - <td class="summary"> - (POSIX) Encrypt a user password.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.dup">dup</a> (oldfd, newfd)</td> - <td class="summary"> - Duplicate a file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.errno">errno</a> ()</td> - <td class="summary"> - Get the last system error code.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.exec">exec</a> (executable, ...)</td> - <td class="summary"> - Execute a file to replace the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.exece">exece</a> (executable, arguments, environment)</td> - <td class="summary"> - Execute a file with a custom environment to replace the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.execp">execp</a> (executable, ...)</td> - <td class="summary"> - Invoke the shell and execute a file to replace the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.fork">fork</a> ()</td> - <td class="summary"> - (POSIX) Clone the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getaddrinfo">getaddrinfo</a> (host, family, service)</td> - <td class="summary"> - Look up a hostname and service via DNS.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getcwd">getcwd</a> ()</td> - <td class="summary"> - Get the current working directory.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getenv">getenv</a> (variable)</td> - <td class="summary"> - Get the current environment table or a specific environment variable.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getgid">getgid</a> ()</td> - <td class="summary"> - (POSIX) Get the group id of the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getgr">getgr</a> (group)</td> - <td class="summary"> - (POSIX) Get all or a specific user group.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getifaddrs">getifaddrs</a> ()</td> - <td class="summary"> - (Linux, BSD) Get a list of available network interfaces and their addresses.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getnameinfo">getnameinfo</a> (ipaddr)</td> - <td class="summary"> - Reverse look up an IP-Address via DNS.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getpid">getpid</a> ()</td> - <td class="summary"> - Get the ID of the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getppid">getppid</a> ()</td> - <td class="summary"> - (POSIX) Get the parent process id of the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getproto">getproto</a> (proto)</td> - <td class="summary"> - Get all or a specific proto entry.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getprotobyname">getprotobyname</a> (name)</td> - <td class="summary"> - Get protocol entry by name.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getprotobynumber">getprotobynumber</a> (proto)</td> - <td class="summary"> - Get protocol entry by number.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getpw">getpw</a> (user)</td> - <td class="summary"> - (POSIX) Get all or a specific user account.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getsp">getsp</a> (user)</td> - <td class="summary"> - (Linux, Solaris) Get all or a specific shadow password entry.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.getuid">getuid</a> ()</td> - <td class="summary"> - (POSIX) Get the user id of the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.kill">kill</a> (target, signal)</td> - <td class="summary"> - (POSIX) Send a signal to one or more processes.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.nanosleep">nanosleep</a> (seconds, nanoseconds)</td> - <td class="summary"> - Sleep for a specified amount of time.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.nice">nice</a> (nice)</td> - <td class="summary"> - (POSIX) Change priority of current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.open">open</a> (path, flags, mode)</td> - <td class="summary"> - Open a file.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.open_flags">open_flags</a> (flag1, ...)</td> - <td class="summary"> - Generate flags for a call to open().</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.openlog">openlog</a> (ident, flag1, ...)</td> - <td class="summary"> - (POSIX) Open a connection to the system logger.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.pipe">pipe</a> ()</td> - <td class="summary"> - Create a pipe.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.poll">poll</a> (fds, timeout)</td> - <td class="summary"> - Wait for some event on a file descriptor.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.poll_flags">poll_flags</a> (mode1, ...)</td> - <td class="summary"> - Generate events-bitfield or parse revents-bitfield for poll.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.sendfile">sendfile</a> (socket, file, length)</td> - <td class="summary"> - (POSIX) Send data from a file to a socket in kernel-space.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.setenv">setenv</a> (variable, value)</td> - <td class="summary"> - Set or unset a environment variable.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.setgid">setgid</a> (gid)</td> - <td class="summary"> - (POSIX) Set the group id of the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.setlogmask">setlogmask</a> (priority)</td> - <td class="summary"> - (POSIX) Set the logmask of the system logger for current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.setsid">setsid</a> ()</td> - <td class="summary"> - (POSIX) Create a new session and set the process group ID.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.setuid">setuid</a> (gid)</td> - <td class="summary"> - (POSIX) Set the user id of the current process.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.signal">signal</a> (signal, handler)</td> - <td class="summary"> - Ignore or use set the default handler for a signal.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.socket">socket</a> (domain, type)</td> - <td class="summary"> - Create a new socket.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.splice">splice</a> (fdin, fdout, length, flags)</td> - <td class="summary"> - (Linux) Send data from / to a pipe in kernel-space.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.splice_flags">splice_flags</a> (flag1, ...)</td> - <td class="summary"> - (Linux) Generate a flag bitfield for a call to splice.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.strerror">strerror</a> (errno)</td> - <td class="summary"> - Get the error message for the corresponding error code.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.sysinfo">sysinfo</a> ()</td> - <td class="summary"> - (Linux) Get overall system statistics.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.syslog">syslog</a> (priority)</td> - <td class="summary"> - (POSIX) Write a message to the system logger.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.times">times</a> ()</td> - <td class="summary"> - (POSIX) Get process times.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.tls">tls</a> (mode)</td> - <td class="summary"> - Create a new TLS context.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.umask">umask</a> (mask)</td> - <td class="summary"> - Sets the file mode creation mask.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.uname">uname</a> ()</td> - <td class="summary"> - (POSIX) Get information about current system and kernel.</td> - </tr> - - <tr> - <td class="name" nowrap><a href="#nixio.waitpid">waitpid</a> (pid, flag1, ...)</td> - <td class="summary"> - (POSIX) Wait for a process to change state.</td> - </tr> - -</table> - - - - - - -<br/> -<br/> - - -<h2><a name="functions"></a>Functions</h2> -<dl class="function"> - - - -<dt><a name="nixio.bind"></a><strong>bind</strong> (host, port, family, socktype)</dt> -<dd> - - Create a new socket and bind it to a network address. - This function is a shortcut for calling nixio.socket and then bind() - on the socket object. - - -<h3>Parameters</h3> -<ul> - - <li> - host: Hostname or IP-Address (optional, default: all addresses) - </li> - - <li> - port: Port or service description - </li> - - <li> - family: Address family [<strong>"any"</strong>, "inet", "inet6"] - </li> - - <li> - socktype: Socket Type [<strong>"stream"</strong>, "dgram"] - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This functions calls getaddrinfo(), socket(), - setsockopt() and bind() but NOT listen(). - - <li>The <em>reuseaddr</em>-option is automatically set before binding. - -</ul> - - - -<h3>Return value:</h3> -Socket Object - - - -</dd> - - - - -<dt><a name="nixio.chdir"></a><strong>chdir</strong> (path)</dt> -<dd> - - Change the working directory. - - -<h3>Parameters</h3> -<ul> - - <li> - path: New working directory - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.closelog"></a><strong>closelog</strong> ()</dt> -<dd> - - (POSIX) Close the connection to the system logger. - - - - - - - - - -</dd> - - - - -<dt><a name="nixio.connect"></a><strong>connect</strong> (host, port, family, socktype)</dt> -<dd> - - Create a new socket and connect to a network address. - This function is a shortcut for calling nixio.socket and then connect() - on the socket object. - - -<h3>Parameters</h3> -<ul> - - <li> - host: Hostname or IP-Address (optional, default: localhost) - </li> - - <li> - port: Port or service description - </li> - - <li> - family: Address family [<strong>"any"</strong>, "inet", "inet6"] - </li> - - <li> - socktype: Socket Type [<strong>"stream"</strong>, "dgram"] - </li> - -</ul> - - - - -<h3>Usage:</h3> -This functions calls getaddrinfo(), socket() and connect(). - - - -<h3>Return value:</h3> -Socket Object - - - -</dd> - - - - -<dt><a name="nixio.crypt"></a><strong>crypt</strong> (key, salt)</dt> -<dd> - - (POSIX) Encrypt a user password. - - -<h3>Parameters</h3> -<ul> - - <li> - key: Key - </li> - - <li> - salt: Salt - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -password hash - - - -</dd> - - - - -<dt><a name="nixio.dup"></a><strong>dup</strong> (oldfd, newfd)</dt> -<dd> - - Duplicate a file descriptor. - - -<h3>Parameters</h3> -<ul> - - <li> - oldfd: Old descriptor [File Object, Socket Object (POSIX only)] - </li> - - <li> - newfd: New descriptor to serve as copy (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -This funcation calls dup2() if <em>newfd</em> is set, otherwise dup(). - - - -<h3>Return value:</h3> -File Object of new descriptor - - - -</dd> - - - - -<dt><a name="nixio.errno"></a><strong>errno</strong> ()</dt> -<dd> - - Get the last system error code. - - - - - - - -<h3>Return value:</h3> -Error code - - - -</dd> - - - - -<dt><a name="nixio.exec"></a><strong>exec</strong> (executable, ...)</dt> -<dd> - - Execute a file to replace the current process. - - -<h3>Parameters</h3> -<ul> - - <li> - executable: Executable - </li> - - <li> - ...: Parameters - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>The name of the executable is automatically passed as argv[0] - - <li>This function does not return on success. - -</ul> - - - - - -</dd> - - - - -<dt><a name="nixio.exece"></a><strong>exece</strong> (executable, arguments, environment)</dt> -<dd> - - Execute a file with a custom environment to replace the current process. - - -<h3>Parameters</h3> -<ul> - - <li> - executable: Executable - </li> - - <li> - arguments: Argument Table - </li> - - <li> - environment: Environment Table (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>The name of the executable is automatically passed as argv[0] - - <li>This function does not return on success. - -</ul> - - - - - -</dd> - - - - -<dt><a name="nixio.execp"></a><strong>execp</strong> (executable, ...)</dt> -<dd> - - Invoke the shell and execute a file to replace the current process. - - -<h3>Parameters</h3> -<ul> - - <li> - executable: Executable - </li> - - <li> - ...: Parameters - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>The name of the executable is automatically passed as argv[0] - - <li>This function does not return on success. - -</ul> - - - - - -</dd> - - - - -<dt><a name="nixio.fork"></a><strong>fork</strong> ()</dt> -<dd> - - (POSIX) Clone the current process. - - - - - - - -<h3>Return value:</h3> -the child process id for the parent process, 0 for the child process - - - -</dd> - - - - -<dt><a name="nixio.getaddrinfo"></a><strong>getaddrinfo</strong> (host, family, service)</dt> -<dd> - - Look up a hostname and service via DNS. - - -<h3>Parameters</h3> -<ul> - - <li> - host: hostname to lookup (optional) - </li> - - <li> - family: address family [<strong>"any"</strong>, "inet", "inet6"] - </li> - - <li> - service: service name or port (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing one or more tables containing: <ul> - <li>family = ["inet", "inet6"]</li> - <li>socktype = ["stream", "dgram", "raw"]</li> - <li>address = Resolved IP-Address</li> - <li>port = Resolved Port (if service was given)</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getcwd"></a><strong>getcwd</strong> ()</dt> -<dd> - - Get the current working directory. - - - - - - - -<h3>Return value:</h3> -workign directory - - - -</dd> - - - - -<dt><a name="nixio.getenv"></a><strong>getenv</strong> (variable)</dt> -<dd> - - Get the current environment table or a specific environment variable. - - -<h3>Parameters</h3> -<ul> - - <li> - variable: Variable (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -environment table or single environment variable - - - -</dd> - - - - -<dt><a name="nixio.getgid"></a><strong>getgid</strong> ()</dt> -<dd> - - (POSIX) Get the group id of the current process. - - - - - - - -<h3>Return value:</h3> -process group id - - - -</dd> - - - - -<dt><a name="nixio.getgr"></a><strong>getgr</strong> (group)</dt> -<dd> - - (POSIX) Get all or a specific user group. - - -<h3>Parameters</h3> -<ul> - - <li> - group: Group ID or groupname (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>name = Group Name</li> - <li>gid = Group ID</li> - <li>passwd = Password</li> - <li>mem = {Member #1, Member #2, ...}</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getifaddrs"></a><strong>getifaddrs</strong> ()</dt> -<dd> - - (Linux, BSD) Get a list of available network interfaces and their addresses. - - - - - - - -<h3>Return value:</h3> -Table containing one or more tables containing: <ul> - <li>name = Interface Name</li> - <li>family = ["inet", "inet6", "packet"]</li> - <li>addr = Interface Address (IPv4, IPv6, MAC, ...)</li> - <li>broadaddr = Broadcast Address</li> - <li>dstaddr = Destination Address (Point-to-Point)</li> - <li>netmask = Netmask (if available)</li> - <li>prefix = Prefix (if available)</li> - <li>flags = Table of interface flags (up, multicast, loopback, ...)</li> - <li>data = Statistics (Linux, "packet"-family)</li> - <li>hatype = Hardware Type Identifier (Linix, "packet"-family)</li> - <li>ifindex = Interface Index (Linux, "packet"-family)</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getnameinfo"></a><strong>getnameinfo</strong> (ipaddr)</dt> -<dd> - - Reverse look up an IP-Address via DNS. - - -<h3>Parameters</h3> -<ul> - - <li> - ipaddr: IPv4 or IPv6-Address - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -FQDN - - - -</dd> - - - - -<dt><a name="nixio.getpid"></a><strong>getpid</strong> ()</dt> -<dd> - - Get the ID of the current process. - - - - - - - -<h3>Return value:</h3> -process id - - - -</dd> - - - - -<dt><a name="nixio.getppid"></a><strong>getppid</strong> ()</dt> -<dd> - - (POSIX) Get the parent process id of the current process. - - - - - - - -<h3>Return value:</h3> -parent process id - - - -</dd> - - - - -<dt><a name="nixio.getproto"></a><strong>getproto</strong> (proto)</dt> -<dd> - - Get all or a specific proto entry. - - -<h3>Parameters</h3> -<ul> - - <li> - proto: protocol number or name to lookup (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table (or if no parameter is given, a table of tables) - containing the following fields: <ul> - <li>name = Protocol Name</li> - <li>proto = Protocol Number</li> - <li>aliases = Table of alias names</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getprotobyname"></a><strong>getprotobyname</strong> (name)</dt> -<dd> - - Get protocol entry by name. - - -<h3>Parameters</h3> -<ul> - - <li> - name: protocol name to lookup - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function returns nil if the given protocol is unknown. - - - -<h3>Return value:</h3> -Table containing the following fields: <ul> - <li>name = Protocol Name</li> - <li>proto = Protocol Number</li> - <li>aliases = Table of alias names</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getprotobynumber"></a><strong>getprotobynumber</strong> (proto)</dt> -<dd> - - Get protocol entry by number. - - -<h3>Parameters</h3> -<ul> - - <li> - proto: protocol number to lookup - </li> - -</ul> - - - - -<h3>Usage:</h3> -This function returns nil if the given protocol is unknown. - - - -<h3>Return value:</h3> -Table containing the following fields: <ul> - <li>name = Protocol Name</li> - <li>proto = Protocol Number</li> - <li>aliases = Table of alias names</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getpw"></a><strong>getpw</strong> (user)</dt> -<dd> - - (POSIX) Get all or a specific user account. - - -<h3>Parameters</h3> -<ul> - - <li> - user: User ID or username (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>name = Name</li> - <li>uid = ID</li> - <li>gid = Group ID</li> - <li>passwd = Password</li> - <li>dir = Home directory</li> - <li>gecos = Information</li> - <li>shell = Shell</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getsp"></a><strong>getsp</strong> (user)</dt> -<dd> - - (Linux, Solaris) Get all or a specific shadow password entry. - - -<h3>Parameters</h3> -<ul> - - <li> - user: username (optional) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>namp = Name</li> - <li>expire = Expiration Date</li> - <li>flag = Flags</li> - <li>inact = Inactivity Date</li> - <li>lstchg = Last change</li> - <li>max = Maximum</li> - <li>min = Minimum</li> - <li>warn = Warning</li> - <li>pwdp = Password Hash</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.getuid"></a><strong>getuid</strong> ()</dt> -<dd> - - (POSIX) Get the user id of the current process. - - - - - - - -<h3>Return value:</h3> -process user id - - - -</dd> - - - - -<dt><a name="nixio.kill"></a><strong>kill</strong> (target, signal)</dt> -<dd> - - (POSIX) Send a signal to one or more processes. - - -<h3>Parameters</h3> -<ul> - - <li> - target: Target process of process group. - </li> - - <li> - signal: Signal to send - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.nanosleep"></a><strong>nanosleep</strong> (seconds, nanoseconds)</dt> -<dd> - - Sleep for a specified amount of time. - - -<h3>Parameters</h3> -<ul> - - <li> - seconds: Seconds to wait (optional) - </li> - - <li> - nanoseconds: Nanoseconds to wait (optional) - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>Not all systems support nanosecond precision but you can expect - to have at least maillisecond precision. - - <li>This function is not signal-protected and may fail with EINTR. - -</ul> - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.nice"></a><strong>nice</strong> (nice)</dt> -<dd> - - (POSIX) Change priority of current process. - - -<h3>Parameters</h3> -<ul> - - <li> - nice: Nice Value - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.open"></a><strong>open</strong> (path, flags, mode)</dt> -<dd> - - Open a file. - - -<h3>Parameters</h3> -<ul> - - <li> - path: Filesystem path to open - </li> - - <li> - flags: Flag string or number (see open_flags). - [<strong>"r"</strong>, "r+", "w", "w+", "a", "a+"] - </li> - - <li> - mode: File mode for newly created files (see chmod, umask). - </li> - -</ul> - - - - -<h3>Usage:</h3> -Although this function also supports the traditional fopen() - file flags it does not create a file stream but uses the open() syscall. - - - -<h3>Return value:</h3> -File Object - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.umask"> - umask - </a> - - <li><a href="#nixio.open_flags"> - open_flags - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.open_flags"></a><strong>open_flags</strong> (flag1, ...)</dt> -<dd> - - Generate flags for a call to open(). - - -<h3>Parameters</h3> -<ul> - - <li> - flag1: First Flag ["append", "creat", "excl", "nonblock", "ndelay", - "sync", "trunc", "rdonly", "wronly", "rdwr"] - </li> - - <li> - ...: More Flags [-"-] - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function cannot fail and will never return nil. - - <li>The "nonblock" and "ndelay" flags are aliases. - - <li>The "nonblock", "ndelay" and "sync" flags are no-ops on Windows. - -</ul> - - - -<h3>Return value:</h3> -flag to be used as second parameter to open - - - -</dd> - - - - -<dt><a name="nixio.openlog"></a><strong>openlog</strong> (ident, flag1, ...)</dt> -<dd> - - (POSIX) Open a connection to the system logger. - - -<h3>Parameters</h3> -<ul> - - <li> - ident: Identifier - </li> - - <li> - flag1: Flag 1 ["cons", "nowait", "pid", "perror", "ndelay", "odelay"] - </li> - - <li> - ...: More flags [-"-] - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="nixio.pipe"></a><strong>pipe</strong> ()</dt> -<dd> - - Create a pipe. - - - - - - - -<h3>Return values:</h3> -<ol> - - <li>File Object of the read end - - <li>File Object of the write end - -</ol> - - - -</dd> - - - - -<dt><a name="nixio.poll"></a><strong>poll</strong> (fds, timeout)</dt> -<dd> - - Wait for some event on a file descriptor. - poll() sets the revents-field of the tables provided by fds to a bitfield - indicating the events that occurred. - - -<h3>Parameters</h3> -<ul> - - <li> - fds: Table containing one or more tables containing <ul> - <li> fd = I/O Descriptor [Socket Object, File Object (POSIX)]</li> - <li> events = events to wait for (bitfield generated with poll_flags)</li> - </ul> - </li> - - <li> - timeout: Timeout in milliseconds - </li> - -</ul> - - - - -<h3>Usage</h3> -<ul> - - <li>This function works in-place on the provided table and only - writes the revents field, you can use other fields on your demand. - - <li>All metamethods on the tables provided as fds are ignored. - - <li>The revents-fields are not reset when the call times out. - You have to check the first return value to be 0 to handle this case. - - <li>If you want to wait on a TLS-Socket you have to use the underlying - socket instead. - - <li>On Windows poll is emulated through select(), can only be used - on socket descriptors and cannot take more than 64 descriptors per call. - - <li>This function is not signal-protected and may fail with EINTR. - -</ul> - - - -<h3>Return values:</h3> -<ol> - - <li>number of ready IO descriptors - - <li>the fds-table with revents-fields set - -</ol> - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.poll_flags"> - poll_flags - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.poll_flags"></a><strong>poll_flags</strong> (mode1, ...)</dt> -<dd> - - Generate events-bitfield or parse revents-bitfield for poll. - - -<h3>Parameters</h3> -<ul> - - <li> - mode1: revents-Flag bitfield returned from poll to parse OR - ["in", "out", "err", "pri" (POSIX), "hup" (POSIX), "nval" (POSIX)] - </li> - - <li> - ...: More mode strings for generating the flag [-"-] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -table with boolean fields reflecting the mode parameter - <strong>OR</strong> bitfield to use for the events-Flag field - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.poll"> - poll - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.sendfile"></a><strong>sendfile</strong> (socket, file, length)</dt> -<dd> - - (POSIX) Send data from a file to a socket in kernel-space. - - -<h3>Parameters</h3> -<ul> - - <li> - socket: Socket Object - </li> - - <li> - file: File Object - </li> - - <li> - length: Amount of data to send (in Bytes). - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -bytes sent - - - -</dd> - - - - -<dt><a name="nixio.setenv"></a><strong>setenv</strong> (variable, value)</dt> -<dd> - - Set or unset a environment variable. - - -<h3>Parameters</h3> -<ul> - - <li> - variable: Variable - </li> - - <li> - value: Value (optional) - </li> - -</ul> - - - - -<h3>Usage:</h3> -The environment variable will be unset if value is omitted. - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.setgid"></a><strong>setgid</strong> (gid)</dt> -<dd> - - (POSIX) Set the group id of the current process. - - -<h3>Parameters</h3> -<ul> - - <li> - gid: New Group ID - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.setlogmask"></a><strong>setlogmask</strong> (priority)</dt> -<dd> - - (POSIX) Set the logmask of the system logger for current process. - - -<h3>Parameters</h3> -<ul> - - <li> - priority: Priority ["emerg", "alert", "crit", "err", "warning", - "notice", "info", "debug"] - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="nixio.setsid"></a><strong>setsid</strong> ()</dt> -<dd> - - (POSIX) Create a new session and set the process group ID. - - - - - - - -<h3>Return value:</h3> -session id - - - -</dd> - - - - -<dt><a name="nixio.setuid"></a><strong>setuid</strong> (gid)</dt> -<dd> - - (POSIX) Set the user id of the current process. - - -<h3>Parameters</h3> -<ul> - - <li> - gid: New User ID - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.signal"></a><strong>signal</strong> (signal, handler)</dt> -<dd> - - Ignore or use set the default handler for a signal. - - -<h3>Parameters</h3> -<ul> - - <li> - signal: Signal - </li> - - <li> - handler: ["ign", "dfl"] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -true - - - -</dd> - - - - -<dt><a name="nixio.socket"></a><strong>socket</strong> (domain, type)</dt> -<dd> - - Create a new socket. - - -<h3>Parameters</h3> -<ul> - - <li> - domain: Domain ["inet", "inet6", "unix"] - </li> - - <li> - type: Type ["stream", "dgram", "raw"] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Socket Object - - - -</dd> - - - - -<dt><a name="nixio.splice"></a><strong>splice</strong> (fdin, fdout, length, flags)</dt> -<dd> - - (Linux) Send data from / to a pipe in kernel-space. - - -<h3>Parameters</h3> -<ul> - - <li> - fdin: Input I/O descriptor - </li> - - <li> - fdout: Output I/O descriptor - </li> - - <li> - length: Amount of data to send (in Bytes). - </li> - - <li> - flags: (optional, bitfield generated by splice_flags) - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -bytes sent - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.splice_flags"> - splice_flags - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.splice_flags"></a><strong>splice_flags</strong> (flag1, ...)</dt> -<dd> - - (Linux) Generate a flag bitfield for a call to splice. - - -<h3>Parameters</h3> -<ul> - - <li> - flag1: First Flag ["move", "nonblock", "more"] - </li> - - <li> - ...: More flags [-"-] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Flag bitfield - - - -<h3>See also:</h3> -<ul> - - <li><a href="#nixio.splice"> - splice - </a> - -</ul> - -</dd> - - - - -<dt><a name="nixio.strerror"></a><strong>strerror</strong> (errno)</dt> -<dd> - - Get the error message for the corresponding error code. - - -<h3>Parameters</h3> -<ul> - - <li> - errno: System error code - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -Error message - - - -</dd> - - - - -<dt><a name="nixio.sysinfo"></a><strong>sysinfo</strong> ()</dt> -<dd> - - (Linux) Get overall system statistics. - - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>uptime = system uptime in seconds</li> - <li>loads = {loadavg1, loadavg5, loadavg15}</li> - <li>totalram = total RAM</li> - <li>freeram = free RAM</li> - <li>sharedram = shared RAM</li> - <li>bufferram = buffered RAM</li> - <li>totalswap = total SWAP</li> - <li>freeswap = free SWAP</li> - <li>procs = number of running processes</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.syslog"></a><strong>syslog</strong> (priority)</dt> -<dd> - - (POSIX) Write a message to the system logger. - - -<h3>Parameters</h3> -<ul> - - <li> - priority: Priority ["emerg", "alert", "crit", "err", "warning", - "notice", "info", "debug"] - </li> - -</ul> - - - - - - - - -</dd> - - - - -<dt><a name="nixio.times"></a><strong>times</strong> ()</dt> -<dd> - - (POSIX) Get process times. - - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>utime = user time</li> - <li>utime = system time</li> - <li>cutime = children user time</li> - <li>cstime = children system time</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.tls"></a><strong>tls</strong> (mode)</dt> -<dd> - - Create a new TLS context. - - -<h3>Parameters</h3> -<ul> - - <li> - mode: TLS-Mode ["client", "server"] - </li> - -</ul> - - - - - - -<h3>Return value:</h3> -TLSContext Object - - - -</dd> - - - - -<dt><a name="nixio.umask"></a><strong>umask</strong> (mask)</dt> -<dd> - - Sets the file mode creation mask. - - -<h3>Parameters</h3> -<ul> - - <li> - mask: New creation mask (see chmod for format specifications) - </li> - -</ul> - - - - - - -<h3>Return values:</h3> -<ol> - - <li>the old umask as decimal mode number - - <li>the old umask as mode string - -</ol> - - - -</dd> - - - - -<dt><a name="nixio.uname"></a><strong>uname</strong> ()</dt> -<dd> - - (POSIX) Get information about current system and kernel. - - - - - - - -<h3>Return value:</h3> -Table containing: <ul> - <li>sysname = operating system</li> - <li>nodename = network name (usually hostname)</li> - <li>release = OS release</li> - <li>version = OS version</li> - <li>machine = hardware identifier</li> - </ul> - - - -</dd> - - - - -<dt><a name="nixio.waitpid"></a><strong>waitpid</strong> (pid, flag1, ...)</dt> -<dd> - - (POSIX) Wait for a process to change state. - - -<h3>Parameters</h3> -<ul> - - <li> - pid: Process ID (optional, default: any childprocess) - </li> - - <li> - flag1: Flag (optional) ["nohang", "untraced", "continued"] - </li> - - <li> - ...: More Flags [-"-] - </li> - -</ul> - - - - -<h3>Usage:</h3> -If the "nohang" is given this function becomes non-blocking. - - - -<h3>Return values:</h3> -<ol> - - <li>process id of child or 0 if no child has changed state - - <li>["exited", "signaled", "stopped"] - - <li>[exit code, terminate signal, stop signal] - -</ol> - - - -</dd> - - -</dl> - - - - - -</div> <!-- id="content" --> - -</div> <!-- id="main" --> - -<div id="about"> - <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> -</div> <!-- id="about" --> - -</div> <!-- id="container" --> -</body> -</html> |