Add generated documentation to repository

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich 2015-09-01 12:19:27 +02:00
parent fdb7daa907
commit 2e61188881
31 changed files with 19606 additions and 0 deletions

363
doc/index.html Normal file
View file

@ -0,0 +1,363 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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.protocol.html">luci.http.protocol</a></td>
<td class="summary"></td>
</tr>
<tr>
<td class="name"><a href="modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a></td>
<td class="summary"></td>
</tr>
<tr>
<td class="name"><a href="modules/luci.http.protocol.date.html">luci.http.protocol.date</a></td>
<td class="summary"></td>
</tr>
<tr>
<td class="name"><a href="modules/luci.http.protocol.mime.html">luci.http.protocol.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.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.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/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>

285
doc/luadoc.css Normal file
View file

@ -0,0 +1,285 @@
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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,524 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li><strong>luci.http.protocol.conditionals</strong></li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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.protocol.conditionals</code></h1>
<p></p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#if_match">if_match</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,378 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li><strong>luci.http.protocol.date</strong></li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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.protocol.date</code></h1>
<p></p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#compare">compare</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,721 @@
<!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.protocol</strong></li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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.protocol</code></h1>
<p></p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#header_source">header_source</a>&nbsp;(sock)</td>
<td class="summary">
Creates a ltn12 source from the given socket.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#mimedecode_message_body">mimedecode_message_body</a>&nbsp;(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>&nbsp;(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="#parse_message_header">parse_message_header</a>&nbsp;(src)</td>
<td class="summary">
Try to extract an http message header including information like protocol
version, message headers and resulting CGI environment variables from the
given ltn12 source.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#urldecode">urldecode</a>&nbsp;(str, no_plus)</td>
<td class="summary">
Decode an urlencoded string - optionally without decoding
the "+" sign to " " - and return the decoded string.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#urldecode_message_body">urldecode_message_body</a>&nbsp;(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>&nbsp;(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>&nbsp;(str)</td>
<td class="summary">
Encode given string to x-www-urlencoded format.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#urlencode_params">urlencode_params</a>&nbsp;(tbl)</td>
<td class="summary">
Encode each key-value-pair in given table to x-www-urlencoded format,
separated by "&".</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="header_source"></a><strong>header_source</strong>&nbsp;(sock)</dt>
<dd>
Creates a ltn12 source from the given socket. The source will return it's
data line by line with the trailing \r\n stripped of.
<h3>Parameters</h3>
<ul>
<li>
sock: Readable network socket
</li>
</ul>
<h3>Return value:</h3>
Ltn12 source function
</dd>
<dt><a name="mimedecode_message_body"></a><strong>mimedecode_message_body</strong>&nbsp;(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 withing 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 feeded 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 wheather 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">
parse_message_header
</a>
</ul>
</dd>
<dt><a name="parse_message_body"></a><strong>parse_message_body</strong>&nbsp;(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">
parse_message_header
</a>
</ul>
</dd>
<dt><a name="parse_message_header"></a><strong>parse_message_header</strong>&nbsp;(src)</dt>
<dd>
Try to extract an http message header including information like protocol
version, message headers and resulting CGI environment variables from the
given ltn12 source.
<h3>Parameters</h3>
<ul>
<li>
src: Ltn12 source function
</li>
</ul>
<h3>Return value:</h3>
HTTP message object
<h3>See also:</h3>
<ul>
<li><a href="#parse_message_body">
parse_message_body
</a>
</ul>
</dd>
<dt><a name="urldecode"></a><strong>urldecode</strong>&nbsp;(str, no_plus)</dt>
<dd>
Decode an urlencoded string - optionally without decoding
the "+" sign to " " - and return the decoded string.
<h3>Parameters</h3>
<ul>
<li>
str: Input string in x-www-urlencoded format
</li>
<li>
no_plus: Don't decode "+" signs to spaces
</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="urldecode_message_body"></a><strong>urldecode_message_body</strong>&nbsp;(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 withing 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">
parse_message_header
</a>
</ul>
</dd>
<dt><a name="urldecode_params"></a><strong>urldecode_params</strong>&nbsp;(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>&nbsp;(str)</dt>
<dd>
Encode given string to x-www-urlencoded format.
<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="urlencode_params"></a><strong>urlencode_params</strong>&nbsp;(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>
</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>

View file

@ -0,0 +1,294 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li><strong>luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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.protocol.mime</code></h1>
<p></p>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#to_ext">to_ext</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

532
doc/modules/luci.i18n.html Normal file
View file

@ -0,0 +1,532 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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="#clear">clear</a>&nbsp;()</td>
<td class="summary">
Clear the translation table.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#load">load</a>&nbsp;(file, lang, force)</td>
<td class="summary">
Load a translation and copy its data into the translation table.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#loadc">loadc</a>&nbsp;(file, force)</td>
<td class="summary">
Load a translation file using the default translation language.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#setlanguage">setlanguage</a>&nbsp;(lang)</td>
<td class="summary">
Set the context default translation language.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#string">string</a>&nbsp;(key)</td>
<td class="summary">
Return the translated value for a specific translation key
and ensure that the returned value is a Lua string value.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#stringf">stringf</a>&nbsp;(key, ...)</td>
<td class="summary">
Return the translated value for a specific translation key and use it as sprintf pattern.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#translate">translate</a>&nbsp;(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>&nbsp;(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="clear"></a><strong>clear</strong>&nbsp;()</dt>
<dd>
Clear the translation table.
</dd>
<dt><a name="load"></a><strong>load</strong>&nbsp;(file, lang, force)</dt>
<dd>
Load a translation and copy its data into the translation table.
<h3>Parameters</h3>
<ul>
<li>
file: Language file
</li>
<li>
lang: Two-letter language code
</li>
<li>
force: Force reload even if already loaded (optional)
</li>
</ul>
<h3>Return value:</h3>
Success status
</dd>
<dt><a name="loadc"></a><strong>loadc</strong>&nbsp;(file, force)</dt>
<dd>
Load a translation file using the default translation language.
Alternatively load the translation of the fallback language.
<h3>Parameters</h3>
<ul>
<li>
file: Language file
</li>
<li>
force: Force reload even if already loaded (optional)
</li>
</ul>
</dd>
<dt><a name="setlanguage"></a><strong>setlanguage</strong>&nbsp;(lang)</dt>
<dd>
Set the context default translation language.
<h3>Parameters</h3>
<ul>
<li>
lang: Two-letter language code
</li>
</ul>
</dd>
<dt><a name="string"></a><strong>string</strong>&nbsp;(key)</dt>
<dd>
Return the translated value for a specific translation key
and ensure that the returned value is a Lua string value.
This is the same as calling <code>tostring(translate(...))</code>
<h3>Parameters</h3>
<ul>
<li>
key: Default translation text
</li>
</ul>
<h3>Return value:</h3>
Translated string
</dd>
<dt><a name="stringf"></a><strong>stringf</strong>&nbsp;(key, ...)</dt>
<dd>
Return the translated value for a specific translation key and use it as sprintf pattern.
Ensure that the returned value is a Lua string value.
This is the same as calling <code>tostring(translatef(...))</code>
<h3>Parameters</h3>
<ul>
<li>
key: Default translation text
</li>
<li>
...: Format parameters
</li>
</ul>
<h3>Return value:</h3>
Translated and formatted string
</dd>
<dt><a name="translate"></a><strong>translate</strong>&nbsp;(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>&nbsp;(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>

File diff suppressed because it is too large Load diff

902
doc/modules/luci.ip.html Normal file
View file

@ -0,0 +1,902 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(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>&nbsp;(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>&nbsp;(address, netmask)</td>
<td class="summary">
Construct a new IPv6 luci.ip.cidr instance.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#route">route</a>&nbsp;(address)</td>
<td class="summary">
Determine the route leading to the given destination.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#routes">routes</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>
</ul>
</dd>
<dt><a name="IPv4"></a><strong>IPv4</strong>&nbsp;(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.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</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>
</ul>
</dd>
<dt><a name="IPv6"></a><strong>IPv6</strong>&nbsp;(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.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 IPv6 range.
<h3>See also:</h3>
<ul>
<li><a href="#IPv4">
IPv4
</a>
</ul>
</dd>
<dt><a name="route"></a><strong>route</strong>&nbsp;(address)</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>
</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>&nbsp;(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
critera 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>&nbsp;(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
critera 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>String containing the associated MAC address</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>&nbsp;(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>String containing the link local address of the device in
dotted hex notation</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>

365
doc/modules/luci.jsonc.html Normal file
View file

@ -0,0 +1,365 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc</strong></li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;()</td>
<td class="summary">
Construct a new luci.jsonc.parser instance.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#parse">parse</a>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,428 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li><strong>luci.jsonc.parser</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/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>&nbsp;(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>&nbsp;()</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>&nbsp;(data)</td>
<td class="summary">
Put Lua data into the parser.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#parser.stringify">parser:stringify</a>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;(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.stringify"></a><strong>parser:stringify</strong>&nbsp;(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>

View file

@ -0,0 +1,484 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(name)</td>
<td class="summary">
Disable the given init script
</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init.enable">enable</a>&nbsp;(name)</td>
<td class="summary">
Enable the given init script
</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init.enabled">enabled</a>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;(name)</td>
<td class="summary">
Start the given init script
</td>
</tr>
<tr>
<td class="name" nowrap><a href="#init.stop">stop</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,434 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;()</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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;()</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>

View file

@ -0,0 +1,940 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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="#call">call</a>&nbsp;(...)</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>&nbsp;()</td>
<td class="summary">
Retrieves the output of the "dmesg" command.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#exec">exec</a>&nbsp;(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>&nbsp;(var)</td>
<td class="summary">
Retrieve environment variables.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#hostname">hostname</a>&nbsp;(String)</td>
<td class="summary">
Get or set the current hostname.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#httpget">httpget</a>&nbsp;(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>&nbsp;()</td>
<td class="summary">
Retrieve information about currently mounted file systems.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#net.arptable">arptable</a>&nbsp;()</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>&nbsp;()</td>
<td class="summary">
Returns conntrack information
</td>
</tr>
<tr>
<td class="name" nowrap><a href="#net.deviceinfo">deviceinfo</a>&nbsp;()</td>
<td class="summary">
Return information about available network interfaces.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#net.devices">devices</a>&nbsp;()</td>
<td class="summary">
Determine the names of available network interfaces.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#net.ipv4_hints">ipv4_hints</a>&nbsp;()</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>&nbsp;()</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>&nbsp;()</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>&nbsp;(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>&nbsp;()</td>
<td class="summary">
Returns the current kernel routing table entries.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#net.routes6">routes6</a>&nbsp;()</td>
<td class="summary">
Returns the current ipv6 kernel routing table entries.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#reboot">reboot</a>&nbsp;()</td>
<td class="summary">
Initiate a system reboot.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#syslog">syslog</a>&nbsp;()</td>
<td class="summary">
Retrieves the output of the "logread" command.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#uniqueid">uniqueid</a>&nbsp;(bytes)</td>
<td class="summary">
Generates a random id with specified length.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#uptime">uptime</a>&nbsp;()</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>&nbsp;(...)</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>&nbsp;()</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>&nbsp;(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 containg the return the output of the command
</dd>
<dt><a name="getenv"></a><strong>getenv</strong>&nbsp;(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 containg 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>&nbsp;(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>&nbsp;(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>&nbsp;()</dt>
<dd>
Retrieve information about currently mounted file systems.
<h3>Return value:</h3>
Table containing mount information
</dd>
<dt><a name="net.arptable"></a><strong>arptable</strong>&nbsp;()</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>&nbsp;()</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>&nbsp;()</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>&nbsp;()</dt>
<dd>
Determine the names of available network interfaces.
<h3>Return value:</h3>
Table containing all current interface names
</dd>
<dt><a name="net.ipv4_hints"></a><strong>ipv4_hints</strong>&nbsp;()</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>&nbsp;()</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>&nbsp;()</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>&nbsp;(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>&nbsp;()</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>&nbsp;()</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>
<dt><a name="reboot"></a><strong>reboot</strong>&nbsp;()</dt>
<dd>
Initiate a system reboot.
<h3>Return value:</h3>
Return value of os.execute()
</dd>
<dt><a name="syslog"></a><strong>syslog</strong>&nbsp;()</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>&nbsp;(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>&nbsp;()</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>

View file

@ -0,0 +1,416 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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.info">info</a>&nbsp;()</td>
<td class="summary">
Get the current process id.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#process.list">list</a>&nbsp;()</td>
<td class="summary">
Retrieve information about currently running processes.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#process.setgroup">setgroup</a>&nbsp;(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>&nbsp;(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>&nbsp;(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.info"></a><strong>info</strong>&nbsp;()</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>&nbsp;()</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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,384 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(uid)</td>
<td class="summary">
Retrieve user informations for given uid.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#user.checkpasswd">checkpasswd</a>&nbsp;(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>&nbsp;(username)</td>
<td class="summary">
Retrieve the current user password hash.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#user.setpasswd">setpasswd</a>&nbsp;(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>&nbsp;(uid)</dt>
<dd>
Retrieve user informations 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>&nbsp;(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 wheather the passwords are equal
</dd>
<dt><a name="user.getpasswd"></a><strong>getpasswd</strong>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,252 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,258 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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 explicitely 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>

View file

@ -0,0 +1,284 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;()</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>&nbsp;(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>&nbsp;()</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>&nbsp;(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>

641
doc/modules/nixio.File.html Normal file
View file

@ -0,0 +1,641 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;()</td>
<td class="summary">
Close the file descriptor.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#File.fileno">File:fileno</a>&nbsp;()</td>
<td class="summary">
Get the number of the filedescriptor.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#File.lock">File:lock</a>&nbsp;(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>&nbsp;(length)</td>
<td class="summary">
Read from a file descriptor.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#File.seek">File:seek</a>&nbsp;(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>&nbsp;(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>&nbsp;(field)</td>
<td class="summary">
Get file status and attributes.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#File.sync">File:sync</a>&nbsp;(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>&nbsp;()</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>&nbsp;(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>&nbsp;()</dt>
<dd>
Close the file descriptor.
<h3>Return value:</h3>
true
</dd>
<dt><a name="File.fileno"></a><strong>File:fileno</strong>&nbsp;()</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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;(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>

View file

@ -0,0 +1,342 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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 explicitely 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 ommiting
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 ommitted for pratical 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 ommiting 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>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,447 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,543 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;()</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>&nbsp;()</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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;()</td>
<td class="summary">
Shut down the TLS connection.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#TLSSocket.write">TLSSocket:write</a>&nbsp;(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>&nbsp;()</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>&nbsp;()</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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;(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>

View file

@ -0,0 +1,735 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(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>&nbsp;()</td>
<td class="summary">
Close the descriptor.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#UnifiedIO.copy">UnifiedIO:copy</a>&nbsp;(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>&nbsp;(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>&nbsp;()</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>&nbsp;()</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>&nbsp;()</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>&nbsp;(limit)</td>
<td class="summary">
Create a line-based iterator.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#UnifiedIO.readall">UnifiedIO:readall</a>&nbsp;(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>&nbsp;(close_when_done)</td>
<td class="summary">
Create a sink.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#UnifiedIO.writeall">UnifiedIO:writeall</a>&nbsp;(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>&nbsp;(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 ommited, 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>&nbsp;()</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>&nbsp;(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 ommited, 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 occured
<li>- reserved for error code -
<li>- reserved for error message -
<li>bytes that were successfully written even if an error occured
</ol>
</dd>
<dt><a name="UnifiedIO.copyz"></a><strong>UnifiedIO:copyz</strong>&nbsp;(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 ommited, 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 occured
<li>- reserved for error code -
<li>- reserved for error message -
<li>bytes that were successfully written even if an error occured
</ol>
</dd>
<dt><a name="UnifiedIO.is_file"></a><strong>UnifiedIO:is_file</strong>&nbsp;()</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>&nbsp;()</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>&nbsp;()</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>&nbsp;(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 ommited, 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>&nbsp;(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 ommited, 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 occured
<li>- reserved for error code -
<li>- reserved for error message -
<li>data that was successfully read even if an error occured
</ol>
</dd>
<dt><a name="UnifiedIO.sink"></a><strong>UnifiedIO:sink</strong>&nbsp;(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>&nbsp;(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 occured
<li>- reserved for error code -
<li>- reserved for error message -
<li>bytes that were successfully written even if an error occured
</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>

395
doc/modules/nixio.bin.html Normal file
View file

@ -0,0 +1,395 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(buffer)</td>
<td class="summary">
Base64 decode a given buffer.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#b64encode">b64encode</a>&nbsp;(buffer)</td>
<td class="summary">
Base64 encode a given buffer.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#crc32">crc32</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

712
doc/modules/nixio.bit.html Normal file
View file

@ -0,0 +1,712 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(oper, shift)</td>
<td class="summary">
Arithmetically right shift a number.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#band">band</a>&nbsp;(oper1, oper2, ...)</td>
<td class="summary">
Bitwise AND several numbers.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#bnot">bnot</a>&nbsp;(oper)</td>
<td class="summary">
Invert given number.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#bor">bor</a>&nbsp;(oper1, oper2, ...)</td>
<td class="summary">
Bitwise OR several numbers.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#bxor">bxor</a>&nbsp;(oper1, oper2, ...)</td>
<td class="summary">
Bitwise XOR several numbers.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#cast">cast</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(oper, shift)</td>
<td class="summary">
Left shift a number.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#rshift">rshift</a>&nbsp;(oper, shift)</td>
<td class="summary">
Right shift a number.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#set">set</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>&nbsp;(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>

View file

@ -0,0 +1,287 @@
<!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.protocol.html">luci.http.protocol</a>
</li>
<li>
<a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
</li>
<li>
<a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
</li>
<li>
<a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
</li>
<li>
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</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/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>&nbsp;(algo)</td>
<td class="summary">
Create a hash object.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#nixio.crypto.hmac">hmac</a>&nbsp;(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>&nbsp;(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>&nbsp;(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>

1530
doc/modules/nixio.fs.html Normal file

File diff suppressed because it is too large Load diff

2373
doc/modules/nixio.html Normal file

File diff suppressed because it is too large Load diff