deploy: 5f5a61caf8
This commit is contained in:
commit
b0a65a8d79
133 changed files with 406926 additions and 0 deletions
0
.nojekyll
Normal file
0
.nojekyll
Normal file
246
CBI.md
Normal file
246
CBI.md
Normal file
|
@ -0,0 +1,246 @@
|
|||
|
||||
# CBI models
|
||||
are Lua files describing the structure of an UCI config file and the resulting HTML form to be evaluated by the CBI parser.<br />
|
||||
All CBI model files must return an object of type **luci.cbi.Map**.<br />
|
||||
For a commented example of a CBI model, see the [Writing Modules tutorial](ModulesHowTo.md#cbimodels).
|
||||
|
||||
The scope of a CBI model file is automatically extended by the contents of the module **luci.cbi** and the _translate_ function from **luci.i18n**
|
||||
|
||||
This Reference covers **the basics** of the CBI system.
|
||||
|
||||
|
||||
## class Map (_config, title, description_)
|
||||
This is the root object of the model.
|
||||
|
||||
* **config:** configuration filename to be mapped, see [UCI documentation](https://openwrt.org/docs/guide-user/base-system/uci) and the files in /etc/config
|
||||
* **title:** title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :section (_sectionclass_, ...)
|
||||
Creates a new section
|
||||
* **sectionclass**: a class object of the section
|
||||
* _additional parameters passed to the constructor of the section class_
|
||||
|
||||
----
|
||||
|
||||
## class NamedSection (_name, type, title, description_)
|
||||
An object describing an UCI section selected by the name.<br />
|
||||
To instantiate use: `Map:section(NamedSection, "name", "type", "title", "description")`
|
||||
|
||||
* **name:** UCI section name
|
||||
* **type:** UCI section type
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :option(_optionclass_, ...)
|
||||
Creates a new option
|
||||
* **optionclass:** a class object of the section
|
||||
* _additional parameters passed to the constructor of the option class_
|
||||
|
||||
#### property .addremove = false
|
||||
Allows the user to remove and recreate the configuration section.
|
||||
|
||||
#### property .dynamic = false
|
||||
Marks this section as dynamic. Dynamic sections can contain an undefinded number of completely userdefined options.
|
||||
|
||||
#### property .optional = true
|
||||
Parse optional options
|
||||
|
||||
----
|
||||
|
||||
## class TypedSection (_type, title, description_)
|
||||
An object describing a group of UCI sections selected by their type.<br />
|
||||
To instantiate use: `Map:section(TypedSection, "type", "title", "description")`
|
||||
* **type:** UCI section type
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :option(_optionclass_, ...)
|
||||
Creates a new option
|
||||
**optionclass:** a class object of the section
|
||||
_additional parameters passed to the constructor of the option class_
|
||||
|
||||
#### function :depends(_key, value_)
|
||||
Only select those sections where _key == value_ <br />
|
||||
If you call this function several times the dependencies will be linked with **"or"**
|
||||
|
||||
#### function .filter(_self, section_) -abstract-
|
||||
You can override this function to filter certain sections that will not be parsed.
|
||||
The filter function will be called for every section that should be parsed and returns **nil** for sections that should be filtered. For all other sections it should return the section name as given in the second parameter.
|
||||
|
||||
#### property .addremove = false
|
||||
Allows the user to remove and recreate the configuration section
|
||||
|
||||
#### property .dynamic = false
|
||||
Marks this section as dynamic. Dynamic sections can contain an undefinded number of completely userdefined options.
|
||||
|
||||
#### property .optional = true
|
||||
Parse optional options
|
||||
|
||||
#### property .anonymous = false
|
||||
Do not show UCI section names
|
||||
|
||||
----
|
||||
|
||||
## class Value (_option, title, description_)
|
||||
An object describing an option in a section of a UCI File. Creates a standard text field in the formular.<br />
|
||||
To instantiate use: `NamedSection:option(Value, "option", "title", "description")`<br />
|
||||
or `TypedSection:option(Value, "option", "title", "description")`
|
||||
* **option:** UCI option name
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :depends(key, value)
|
||||
Only show this option field if another option _key_ is set to _value_ in the same section.<br />
|
||||
If you call this function several times the dependencies will be linked with **"or"**
|
||||
|
||||
#### function :value(key, value)
|
||||
Convert this text field into a combobox if possible and add a selection option.
|
||||
|
||||
#### property .default = nil
|
||||
The default value
|
||||
|
||||
#### property .maxlength = nil
|
||||
The maximum inputlength (of chars) of the value
|
||||
|
||||
#### property .optional = false
|
||||
Marks this option as optional, implies .rmempty = true
|
||||
|
||||
#### property .rmempty = true
|
||||
Removes this option from the configuration file when the user enters an empty value
|
||||
|
||||
#### property .size = nil
|
||||
The maximum number of chars displayed by form field
|
||||
|
||||
----
|
||||
|
||||
## class ListValue (_option, title, description_)
|
||||
An object describing an option in a section of a UCI File.<br />
|
||||
Creates a list box or list of radio (for selecting one of many choices) in the formular.<br />
|
||||
To instantiate use: `NamedSection:option(ListValue, "option", "title", "description")`<br />
|
||||
or `TypedSection:option(ListValue, "option", "title", "description")`
|
||||
* **option:** UCI option name
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :depends(key, value)
|
||||
Only show this option field if another option _key_ is set to _value_ in the same section.<br />
|
||||
If you call this function several times the dependencies will be linked with **"or"**
|
||||
|
||||
#### function :value(_key, value_)
|
||||
Adds an entry to the selection list
|
||||
|
||||
#### property .widget = "select"
|
||||
**"select"** shows a selection list, **"radio"** shows a list of radio buttons inside form
|
||||
|
||||
#### property .default = nil
|
||||
The default value
|
||||
|
||||
#### property .optional = false
|
||||
Marks this option as optional, implies .rmempty = true
|
||||
|
||||
#### property .rmempty = true
|
||||
Removes this option from the configuration file when the user enters an empty value
|
||||
|
||||
#### property .size = nil
|
||||
The size of the form field
|
||||
|
||||
----
|
||||
|
||||
## class Flag (_option, title, description_)
|
||||
An object describing an option with two possible values in a section of a UCI File.<br />
|
||||
Creates a checkbox field in the formular.<br />
|
||||
To instantiate use: `NamedSection:option(Flag, "option", ""title", "description")`<br />
|
||||
or `TypedSection:option(Flag, "option", "title", "description")`
|
||||
* **option:** UCI option name
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :depends (_key, value_)
|
||||
Only show this option field if another option _key_ is set to _value_ in the same section.<br />
|
||||
If you call this function several times the dependencies will be linked with **"or"**
|
||||
|
||||
#### property .default = nil
|
||||
The default value
|
||||
|
||||
#### property .disabled = 0
|
||||
the value that should be set if the checkbox is unchecked
|
||||
|
||||
#### property .enabled = 1
|
||||
the value that should be set if the checkbox is checked
|
||||
|
||||
#### property .optional = false
|
||||
Marks this option as optional, implies .rmempty = true
|
||||
|
||||
#### property .rmempty = true
|
||||
Removes this option from the configuration file when the user enters an empty value
|
||||
|
||||
----
|
||||
|
||||
## class MultiValue (_option'', ''title'', ''description_)
|
||||
An object describing an option in a section of a UCI File.<br />
|
||||
Creates a list of checkboxed or a multiselectable list as form fields.<br />
|
||||
To instantiate use: `NamedSection:option(MultiValue, "option", ""title", "description")`<br />
|
||||
or `TypedSection:option(MultiValue, "option", "title", "description")`
|
||||
* **option:** UCI option name
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### function :depends (_key, value_)
|
||||
Only show this option field if another option _key_ is set to _value_ in the same section.<br />
|
||||
If you call this function several times the dependencies will be linked with **"or"**
|
||||
|
||||
#### function :value(_key, value_)
|
||||
Adds an entry to the list
|
||||
|
||||
#### property .widget = "checkbox"
|
||||
**"select"** shows a selection list, **"checkbox"** shows a list of checkboxes inside form
|
||||
|
||||
#### property .delimiter = " "
|
||||
The string which will be used to delimit the values inside stored option
|
||||
|
||||
#### property .default = nil
|
||||
The default value
|
||||
|
||||
#### property .optional = false
|
||||
Marks this option as optional, implies .rmempty = true
|
||||
|
||||
#### property .rmempty = true
|
||||
Removes this option from the configuration file when the user enters an empty value
|
||||
|
||||
#### property .size = nil
|
||||
The size of the form field (only used if property _.widget = "select"_)
|
||||
|
||||
----
|
||||
|
||||
## class StaticList (_option, title, description_)
|
||||
Similar to the MultiValue, but stores selected Values into a UCI list instead of a character-separated option.
|
||||
|
||||
----
|
||||
|
||||
## class DynamicList (_option, title, description_)
|
||||
A extensible list of user-defined values. Stores Values into a UCI list
|
||||
|
||||
----
|
||||
|
||||
## class DummyValue (_option, title, description_)
|
||||
Creates a readonly text in the form. !It writes no data to UCI!<br />
|
||||
To instantiate use: `NamedSection:option(DummyValue, "option", ""title", "description")`<br />
|
||||
or `TypedSection:option(DummyValue, "option", "title", "description")`
|
||||
* **option:** UCI option name
|
||||
* **title:** The title shown in the UI
|
||||
* **description:** description shown in the UI
|
||||
|
||||
#### property :depends (_key, value_)
|
||||
Only show this option field if another option _key_ is set to _value_ in the same section.<br />
|
||||
If you call this function several times the dependencies will be linked with **"or"**
|
||||
|
||||
----
|
||||
|
||||
## class TextValue (_option, title, description_)
|
||||
An object describing a multi-line textbox in a section in a non-UCI form.
|
||||
|
||||
----
|
||||
|
||||
## class Button (_option, title, description_)
|
||||
An object describing a Button in a section in a non-UCI form.
|
66
JsonRpcHowTo.md
Normal file
66
JsonRpcHowTo.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
LuCI provides some of its libraries to external applications through a JSON-RPC API.
|
||||
This Howto shows how to use it and provides information about available functions.
|
||||
|
||||
|
||||
# Basics
|
||||
LuCI comes with an efficient JSON De-/Encoder together with a JSON-RPC-Server which implements the *JSON-RPC 1.0_' and 2.0 (partly) specifications. The LuCI JSON-RPC server offers several independent APIs. Therefore you have to use '_different URLs for every exported library*.
|
||||
Assuming your LuCI-Installation can be reached through */cgi-bin/luci_' any exported library can be reached via '''/cgi-bin/luci/rpc/''LIBRARY_*.
|
||||
|
||||
|
||||
# Authentication
|
||||
Most exported libraries will require a valid authentication to be called with. If you get an *HTTP 403 Forbidden_' status code you are probably missing a valid authentication token. To get such a token you have to call the function '''login''' of the RPC-Library '''auth'''. Following our example from above this login function would be provided at '_/cgi-bin/luci/rpc/auth*. The function accepts 2 parameters: username and password (of a valid user account on the host system) and returns an authentication token.
|
||||
|
||||
If you want to call any exported library which requires an authentication token you have to *append it as an URL parameter _auth''''' to the RPC-Server URL. So instead of calling '''/cgi-bin/luci/rpc/''LIBRARY''''' you have to call '''/cgi-bin/luci/rpc/''LIBRARY''?auth=''TOKEN_*.
|
||||
|
||||
If your JSON-RPC client is Cookie-aware (like most browsers are) you will receive the authentication token also with a session cookie and probably don't have to append it to the RPC-Server URL.
|
||||
|
||||
|
||||
# Exported Libraries
|
||||
## uci
|
||||
The UCI-Library */rpc/uci* offers functionality to interact with the Universal Configuration Interface.
|
||||
*Exported Functions:*
|
||||
* [(string) add(config, type)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.add)
|
||||
* [(integer) apply(config)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.apply)
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.changes (object) changes([config])]
|
||||
* [(boolean) commit(config)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.commit)
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.delete (boolean) delete(config, section[, option])]
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.delete_all (boolean) delete_all(config[, type])]
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.foreach (array) foreach(config[, type])]
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.get (mixed) get(config, section[, option])]
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.get_all (object) get_all(config[, section])]
|
||||
* [http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.get (mixed) get_state(config, section[, option])]
|
||||
* [(boolean) revert(config)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.revert)
|
||||
* [(name) section(config, type, name, values)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.section)
|
||||
* [(boolean) set(config, section, option, value)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.set)
|
||||
* [(boolean) tset(config, section, values)](http://luci.subsignal.org/api/luci/modules/luci.model.uci.html#Cursor.tset)
|
||||
|
||||
## uvl
|
||||
The UVL-Library */rpc/uvl* offers functionality to validate UCI files and get schemes describing UCI files.
|
||||
*Exported Functions:*
|
||||
* [(array) get_scheme(scheme)](http://luci.subsignal.org/api/luci/modules/luci.uvl.html#UVL.get_scheme)
|
||||
* [(array) validate(config, section, option)](http://luci.subsignal.org/api/luci/modules/luci.uvl.html#UVL.validate)
|
||||
* [(array) validate_config(config)](http://luci.subsignal.org/api/luci/modules/luci.uvl.html#UVL.validate_config)
|
||||
* [(array) validate_section(config, section)](http://luci.subsignal.org/api/luci/modules/luci.uvl.html#UVL.validate_section)
|
||||
* [(array) validate(config, section, option)](http://luci.subsignal.org/api/luci/modules/luci.uvl.html#UVL.validate_option)
|
||||
|
||||
## fs
|
||||
The Filesystem library */rpc/fs* offers functionality to interact with the filesystem on the host machine.
|
||||
*Exported Functions:*
|
||||
|
||||
* [Complete luci.fs library](http://luci.subsignal.org/api/luci/modules/luci.fs.html)
|
||||
*Note:* All functions are exported as they are except for _readfile'' which encodes its return value in base64 and ''writefile'' which only accepts base64 encoded data as second argument. Note that both functions will only be available when the ''luasocket_ packet is installed on the hostsystem.
|
||||
|
||||
## sys
|
||||
The System library */rpc/sys* offers functionality to interact with the operating system on the host machine.
|
||||
*Exported Functions:*
|
||||
* [Complete luci.sys library](http://luci.subsignal.org/api/luci/modules/luci.sys.html)
|
||||
* [Complete luci.sys.group library](http://luci.subsignal.org/api/luci/modules/luci.sys.group.html) with prefix *group.*
|
||||
* [Complete luci.sys.net library](http://luci.subsignal.org/api/luci/modules/luci.sys.net.html) with prefix *net.*
|
||||
* [Complete luci.sys.process library](http://luci.subsignal.org/api/luci/modules/luci.sys.process.html) with prefix *process.*
|
||||
* [Complete luci.sys.user library](http://luci.subsignal.org/api/luci/modules/luci.sys.user.html) with prefix *user.*
|
||||
* [Complete luci.sys.wifi library](http://luci.subsignal.org/api/luci/modules/luci.sys.wifi.html) with prefix *wifi.*
|
||||
|
||||
## ipkg
|
||||
The IPKG library */rpc/ipkg* offers functionality to interact with the package manager (IPKG or OPKG) on the host machine.
|
||||
*Exported Functions:*
|
||||
* [Complete luci.model.ipkg library](http://luci.subsignal.org/api/luci/modules/luci.model.ipkg.html)
|
87
LAR.md
Normal file
87
LAR.md
Normal file
|
@ -0,0 +1,87 @@
|
|||
LAR is a simple archive format to pack multiple lua source files and arbitrary other resources into a single file.
|
||||
|
||||
|
||||
# Format Specification
|
||||
|
||||
A LAR archive file is divided into two parts: the payload and the index lookup table.
|
||||
All segments of the archive are 4 Byte aligned to ease reading and processing of the format.
|
||||
All integers are stored in network byte order, so an implementation has to use htonl() and htons() to properly read them.
|
||||
|
||||
Schema:
|
||||
|
||||
<payload:
|
||||
<member:
|
||||
<N*4 bytes: path of file #1>
|
||||
<N*4 bytes: data of file #1>
|
||||
>
|
||||
|
||||
<member:
|
||||
<N*4 bytes: path of file #2>
|
||||
<N*4 bytes: data of file #2>
|
||||
>
|
||||
|
||||
...
|
||||
|
||||
<member:
|
||||
<N*4 bytes: path of file #N>
|
||||
<N*4 bytes: data of file #N>
|
||||
>
|
||||
>
|
||||
|
||||
<index table:
|
||||
<entry:
|
||||
<uint32: offset for path of file #1> <uint32: length for path of file #1>
|
||||
<uint32: offset for data of file #1> <uint32: length for data of file #1>
|
||||
<uint16: type of file #1> <uint16: flags of file #1>
|
||||
>
|
||||
|
||||
<entry:
|
||||
<uint32: offset for path of file #2> <uint32: length for path of file #2>
|
||||
<uint32: offset for data of file #2> <uint32: length for data of file #2>
|
||||
<uint16: type of file #2> <uint16: flags of file #2>
|
||||
>
|
||||
|
||||
...
|
||||
|
||||
<entry:
|
||||
<uint32: offset for path of file #N> <uint32: length for path of file #N>
|
||||
<uint32: offset for data of file #N> <uint32: length for data of file #N>
|
||||
<uint16: type of file #N> <uint16: flags of file #N>
|
||||
>
|
||||
>
|
||||
|
||||
<uint32: offset for begin of index table>
|
||||
|
||||
|
||||
|
||||
# Processing
|
||||
|
||||
In order to process an LAR archive, an implementation would have to do the following steps:
|
||||
|
||||
## Read Index
|
||||
|
||||
1. Locate and open the archive file
|
||||
1. Seek to end of file - 4 bytes
|
||||
1. Read 32bit index offset and swap from network to native byte order
|
||||
1. Seek to index offset, calculate index length: filesize - index offset - 4
|
||||
1. Initialize a linked list for index table entries
|
||||
1. Read each index entry until the index length is reached, read and byteswap 4 * 32bit int and 2 * 16bit int
|
||||
1. Seek to begin of file
|
||||
|
||||
## Read Member
|
||||
|
||||
1. Read the archive index
|
||||
1. Iterate through the linked index list, perform the following steps for each entry
|
||||
1. Seek to the specified file path offset
|
||||
1. Read as much bytes as specified in the file path length into a buffer
|
||||
1. Compare the contents of the buffer against the path of the searched member
|
||||
1. If buffer and searched path are equal, seek to the specified file data offset
|
||||
1. Read data until the file data length is reached, return
|
||||
1. Select the next index table entry and repeat from step 3, if there is no next entry then return
|
||||
|
||||
# Reference implementation
|
||||
|
||||
A reference implementation can be found here:
|
||||
http://luci.subsignal.org/trac/browser/luci/trunk/contrib/lar
|
||||
|
||||
The lar.pl script is a simple packer for LAR archives and cli.c provides a utility to list and dump packed LAR archives.
|
144
LMO.md
Normal file
144
LMO.md
Normal file
|
@ -0,0 +1,144 @@
|
|||
LMO is a simple binary format to pack language strings into a more efficient form. Although it's suitable to store any kind of key-value table, it's only used for the LuCI *.po based translation system at the moment. The abbreviation "LMO" stands for "Lua Machine Objects" in the style of the GNU gettext *.mo format.
|
||||
|
||||
|
||||
# Format Specification
|
||||
|
||||
A LMO file is divided into two parts: the payload and the index lookup table.
|
||||
All segments of the file are 4 Byte aligned to ease reading and processing of the format.
|
||||
Only unsigned 32bit integers are used and stored in network byte order, so an implementation has to use htonl() to properly read them.
|
||||
|
||||
Schema:
|
||||
|
||||
<file:
|
||||
<payload:
|
||||
<entry #1: 4 byte aligned data>
|
||||
|
||||
<entry #2: 4 byte aligned data>
|
||||
|
||||
...
|
||||
|
||||
<entry #N: 4 byte aligned data>
|
||||
>
|
||||
|
||||
<index table:
|
||||
<entry #1:
|
||||
<uint32_t: hash of the first key>
|
||||
<uint32_t: hash of the first value>
|
||||
<uint32_t: file offset of the first value>
|
||||
<uint32_t: length of the first value>
|
||||
>
|
||||
|
||||
<entry #2:
|
||||
<uint32_t: hash of the second key>
|
||||
<uint32_t: hash of the second value>
|
||||
<uint32_t: file offset of the second value>
|
||||
<uint32_t: length of the second value>
|
||||
>
|
||||
|
||||
...
|
||||
|
||||
<entry #N:
|
||||
<uint32_t: hash of the Nth key>
|
||||
<uint32_t: hash of the Nth value>
|
||||
<uint32_t: file offset of the Nth value>
|
||||
<uint32_t: length of the Nth value>
|
||||
>
|
||||
>
|
||||
|
||||
<uint32_t: offset of the begin of index table>
|
||||
>
|
||||
|
||||
|
||||
|
||||
# Processing
|
||||
|
||||
In order to process a LMO file, an implementation would have to do the following steps:
|
||||
|
||||
## Read Index
|
||||
|
||||
1. Locate and open the archive file
|
||||
1. Seek to end of file - 4 bytes (sizeof(uint32_t))
|
||||
1. Read 32bit index offset and swap from network to native byte order
|
||||
1. Seek to index offset, calculate index length: filesize - index offset - 4
|
||||
1. Initialize a linked list for index table entries
|
||||
1. Read each index entry until the index length is reached, read and byteswap 4 * uint32_t for each step
|
||||
1. Seek to begin of file
|
||||
|
||||
## Read Entry
|
||||
|
||||
1. Calculate the unsigned 32bit hash of the entries key value (see "Hash Function" section below)
|
||||
1. Obtain the archive index
|
||||
1. Iterate through the linked index list, perform the following steps for each entry:
|
||||
1. Compare the entry hash value with the calculated hash from step 1
|
||||
2. If the hash values are equal proceed with step 4
|
||||
3. Select the next entry and repeat from step 3.1
|
||||
1. Seek to the file offset specified in the selected entry
|
||||
1. Read as much bytes as specified in the entry length into a buffer
|
||||
1. Return the buffer value
|
||||
|
||||
# Hash Function
|
||||
|
||||
The current LuCI-LMO implementation uses the "Super Fast Hash" function which was kindly put in the public domain by it's original author. See http://www.azillionmonkeys.com/qed/hash.html for details. Below is the C-Implementation of this function:
|
||||
|
||||
|
||||
#if (defined(__GNUC__) && defined(__i386__))
|
||||
#define sfh_get16(d) (*((const uint16_t *) (d)))
|
||||
#else
|
||||
#define sfh_get16(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
|
||||
+(uint32_t)(((const uint8_t *)(d))[0]) )
|
||||
#endif
|
||||
|
||||
uint32_t sfh_hash(const char * data, int len)
|
||||
{
|
||||
uint32_t hash = len, tmp;
|
||||
int rem;
|
||||
|
||||
if (len <= NULL) return 0;
|
||||
|
||||
rem = len & 3;
|
||||
len >>= 2;
|
||||
|
||||
/* Main loop */
|
||||
for (;len > 0; len--) {
|
||||
hash += sfh_get16(data);
|
||||
tmp = (sfh_get16(data+2) << 11) ^ hash;
|
||||
hash = (hash << 16) ^ tmp;
|
||||
data += 2*sizeof(uint16_t);
|
||||
hash += hash >> 11;
|
||||
}
|
||||
|
||||
/* Handle end cases */
|
||||
switch (rem) {
|
||||
case 3: hash += sfh_get16(data);
|
||||
hash ^= hash << 16;
|
||||
hash ^= data[sizeof(uint16_t)] << 18;
|
||||
hash += hash >> 11;
|
||||
break;
|
||||
case 2: hash += sfh_get16(data);
|
||||
hash ^= hash << 11;
|
||||
hash += hash >> 17;
|
||||
break;
|
||||
case 1: hash += *data;
|
||||
hash ^= hash << 10;
|
||||
hash += hash >> 1;
|
||||
}
|
||||
|
||||
/* Force "avalanching" of final 127 bits */
|
||||
hash ^= hash << 3;
|
||||
hash += hash >> 5;
|
||||
hash ^= hash << 4;
|
||||
hash += hash >> 17;
|
||||
hash ^= hash << 25;
|
||||
hash += hash >> 6;
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
# Reference Implementation
|
||||
|
||||
A reference implementation can be found here:
|
||||
http://luci.subsignal.org/trac/browser/luci/trunk/libs/lmo/src
|
||||
|
||||
The lmo_po2lmo.c executable implements a *.po to *.lmo conversation utility and lmo_lookup.c is a simple *.lmo test utility.
|
||||
Lua bindings for lmo are defined in lmo_lualib.c and associated headers.
|
202
LuCI-0.10.md
Normal file
202
LuCI-0.10.md
Normal file
|
@ -0,0 +1,202 @@
|
|||
[[PageOutline(2-5, Table of Contents, floated)]]
|
||||
|
||||
|
||||
This document describes new features and incompatibilities to LuCI 0.9.x.
|
||||
It is targeted at module authors developing external addons to LuCI.
|
||||
|
||||
# I18N Changes
|
||||
|
||||
## API
|
||||
|
||||
The call conventions for the i18n api changed, there is no dedicated translation
|
||||
key anymore and the english text is used for lookup instead. This was done to
|
||||
ease the maintenance of language files.
|
||||
|
||||
Code that uses _translate()'' or ''i18n()_ must be changed as follows:
|
||||
|
||||
|
||||
-- old style:
|
||||
translate("some_text", "Some Text")
|
||||
translatef("some_format_text", "Some formatted Text: %d", 123)
|
||||
|
||||
-- new style:
|
||||
translate("Some Text")
|
||||
translatef("Some formatted Text: %d", 123)
|
||||
|
||||
|
||||
Likewise for templates:
|
||||
|
||||
|
||||
<!-- old style: -->
|
||||
<%:some_text Some Text%>
|
||||
|
||||
<!-- new style: -->
|
||||
<%:Some Text%>
|
||||
|
||||
|
||||
If code must support both LuCI 0.9.x and 0.10.x versions, it is suggested to write the calls as follows:
|
||||
|
||||
translate("Some Text", "Some Text")
|
||||
|
||||
|
||||
An alternative is wrapping translate() calls into a helper function:
|
||||
|
||||
function tr(key, alt)
|
||||
return translate(key) or translate(alt) or alt
|
||||
end
|
||||
|
||||
|
||||
... which is used as follows:
|
||||
|
||||
tr("some_key", "Some Text")
|
||||
|
||||
|
||||
## Translation File Format
|
||||
|
||||
Translation catalogs are now maintained in *.po format files. During build those get translated
|
||||
into [*.lmo archives](http://luci.subsignal.org/trac/wiki/Documentation/LMO).
|
||||
|
||||
LuCI ships a [utility script](http://luci.subsignal.org/trac/browser/luci/branches/luci-0.10/build/i18n-lua2po.pl)
|
||||
in the build/ directory to convert old Lua translation files to the *.po format. The generated *.po files should
|
||||
be placed in the appropriate subdirectories within the top po/ file in the LuCI source tree.
|
||||
|
||||
### Components built within the LuCI tree
|
||||
|
||||
If components using translations are built along with the LuCI tree, the newly added *.po file are automatically
|
||||
compiled into *.lmo archives during the build process. In order to bundle the appropriate *.lmo files into the
|
||||
corresponding *.ipk packages, component Makefiles must include a "PO" variable specifying the files to include.
|
||||
|
||||
Given a module _applications/example/'' which uses ''po/en/example.po'' and ''po/en/example-extra.po_,
|
||||
the _applications/example/Makefile_ must be changed as follows:
|
||||
|
||||
|
||||
PO = example example-extra
|
||||
|
||||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
||||
|
||||
|
||||
### Standalone components
|
||||
|
||||
Authors who externally package LuCI components must prepare required *.lmo archives themselves.
|
||||
To convert existing Lua based message catalogs to the *.po format, the build/i18n-lua2po.pl helper script can be used.
|
||||
In order to convert *.po files into *.lmo files, the standalone "po2lmo" utility must be compiled as follows:
|
||||
|
||||
|
||||
$ svn co http://svn.luci.subsignal.org/luci/branches/luci-0.10/libs/lmo
|
||||
$ cd lmo/
|
||||
$ make
|
||||
$ ./src/po2lmo translations.po translations.lmo
|
||||
|
||||
|
||||
Note that at the time of writing, the utility program needs Lua headers installed on the system in order to compile properly.
|
||||
|
||||
# CBI
|
||||
|
||||
## Datatypes
|
||||
|
||||
The server side UVL validation has been dropped to reduce space requirements on the target.
|
||||
Instead it is possible to define datatypes for CBI widgets now:
|
||||
|
||||
|
||||
opt = section:option(Value, "optname", "Title Text")
|
||||
opt.datatype = "ip4addr"
|
||||
|
||||
|
||||
User provided data is validated once on the frontend via JavaScript and on the server side prior to saving it.
|
||||
A list of possible datatypes can be found in the [luci.cbi.datatypes](http://luci.subsignal.org/trac/browser/luci/branches/luci-0.10/libs/web/luasrc/cbi/datatypes.lua#L26) class.
|
||||
|
||||
## Validation
|
||||
|
||||
Server-sided validator function can now return custom error messages to provide better feedback on invalid input.
|
||||
|
||||
|
||||
opt = section:option(Value, "optname", "Title Text")
|
||||
|
||||
function opt.validate(self, value, section)
|
||||
if input_is_valid(value) then
|
||||
return value
|
||||
else
|
||||
return nil, "The value is invalid because ..."
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
## Tabs
|
||||
|
||||
It is now possible to break up CBI sections into multiple tabs to better organize longer forms.
|
||||
The TypedSection and NamedSection classes gained two new functions to define tabs, _tab()'' and ''taboption()_.
|
||||
|
||||
|
||||
sct = map:section(TypedSection, "name", "type", "Title Text")
|
||||
|
||||
sct:tab("general", "General Tab Title", "General Tab Description")
|
||||
sct:tab("advanced", "Advanced Tab Title", "Advanced Tab Description")
|
||||
|
||||
opt = sct:taboption("general", Value, "optname", "Title Text")
|
||||
...
|
||||
|
||||
|
||||
The _tab()_ function is declares a new tab and takes up to three arguments:
|
||||
* Internal name of the tab, must be unique within the section
|
||||
* Title text of the tab
|
||||
* Optional description text for the tab
|
||||
|
||||
The _taboption()'' function wraps ''option()_ and assigns the option object to the given tab.
|
||||
It takes up to five arguments:
|
||||
|
||||
* Name of the tab to assign the option to
|
||||
* Option type, e.g. Value or DynamicList
|
||||
* Option name
|
||||
* Title text of the option
|
||||
* Optional description text of the option
|
||||
|
||||
If tabs are used within a particular section, the _option()_ function must not be used,
|
||||
doing so results in undefined behaviour.
|
||||
|
||||
## Hooks
|
||||
|
||||
The CBI gained support for _hooks_ which can be used to trigger additional actions during the
|
||||
life-cycle of a map:
|
||||
|
||||
|
||||
map = Map("config", "Title Text")
|
||||
|
||||
function map.on_commit(self)
|
||||
-- do something if the UCI configuration got committed
|
||||
end
|
||||
|
||||
|
||||
The following hooks are defined:
|
||||
|
||||
|| on_cancel || The user pressed cancel within a multi-step Delegator or a SimpleForm instance ||
|
||||
|| on_init || The CBI is about to render the Map object ||
|
||||
|| on_parse || The CBI is about to read received HTTP form values ||
|
||||
|| on_save, on_before_save || The CBI is about to save modified UCI configuration files ||
|
||||
|| on_after_save || Modified UCI configuration files just got saved
|
||||
|| on_before_commit || The CBI is about to commit the changes ||
|
||||
|| on_commit, on_after_commit, on_before_apply || Modified configurations got committed and the CBI is about to restart associated services ||
|
||||
|| on_apply, on_after_apply || All changes where completely applied (only works on Map instances with the apply_on_parse attribute set) ||
|
||||
|
||||
## Sortable Tables
|
||||
|
||||
TypedSection instances which use the "cbi/tblsection" template may now use a new attribute _sortable_ to allow the user to reorder table rows.
|
||||
|
||||
|
||||
sct = map:section(TypedSection, "name", "type", "Title Text")
|
||||
sct.template = "cbi/tblsection"
|
||||
sct.sortable = true
|
||||
|
||||
...
|
||||
|
||||
|
||||
# JavaScript
|
||||
|
||||
The LuCI 0.10 branch introduced a new JavaScript file _xhr.js_ which provides support routines for XMLHttpRequest operations.
|
||||
Each theme must include this file in the <head> area of the document for forms to work correctly.
|
||||
|
||||
It should be included like this:
|
||||
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
|
||||
|
94
Modules.md
Normal file
94
Modules.md
Normal file
|
@ -0,0 +1,94 @@
|
|||
# Categories
|
||||
|
||||
The LuCI modules are divided into several category directories, namely:
|
||||
* applications (Single applications or plugins for other modules or applications)
|
||||
* i18n (Translation files)
|
||||
* libs (Independent libraries)
|
||||
* modules (Collections of applications)
|
||||
* themes (Frontend themes)
|
||||
|
||||
Each module goes into a subdirectory of any of this category-directories.
|
||||
|
||||
# Module directory
|
||||
The contents of a module directory are as follows:
|
||||
|
||||
## Makefile
|
||||
This is the module's makefile. If the module just contains Lua sourcecode or resources then the following Makefile should suffice.
|
||||
|
||||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
||||
|
||||
|
||||
If you have C(++) code in your module your Makefile should at least contain the following things.
|
||||
|
||||
include ../../build/config.mk
|
||||
include ../../build/gccconfig.mk
|
||||
include ../../build/module.mk
|
||||
|
||||
compile:
|
||||
# Commands to compile and link your C-code
|
||||
# and to install them under the dist/ hierarchy
|
||||
|
||||
clean: luaclean
|
||||
# Commands to clean your compiled objects
|
||||
|
||||
|
||||
|
||||
## src
|
||||
The *src* directory is reserved for C sourcecode.
|
||||
|
||||
## luasrc
|
||||
*luasrc* contains all Lua sourcecode files. These will automatically be stripped or compiled depending on the Make target and are installed in the LuCI installation directory.
|
||||
|
||||
## lua
|
||||
*lua* is equivalent to _luasrc_ but containing Lua files will be installed in the Lua document root.
|
||||
|
||||
## htdocs
|
||||
All files under *htdocs* will be copied to the document root of the target webserver.
|
||||
|
||||
## root
|
||||
All directories and files under *root* will be copied to the installation target as they are.
|
||||
|
||||
## dist
|
||||
*dist* is reserved for the builder to create a working installation tree that will represent the filesystem on the target machine.
|
||||
*DO NOT* put any files there as they will get deleted.
|
||||
|
||||
## ipkg
|
||||
*ipkg* contains IPKG package control files, like _preinst'', ''posinst'', ''prerm'', ''postrm''. ''conffiles_.
|
||||
See IPKG documentation for details.
|
||||
|
||||
|
||||
# OpenWRT feed integration
|
||||
If you want to add your module to the LuCI OpenWRT feed you have to add several sections to the contrib/package/luci/Makefile.
|
||||
|
||||
For a Web UI applications this is:
|
||||
|
||||
A package description:
|
||||
|
||||
define Package/luci-app-YOURMODULE
|
||||
$(call Package/luci/webtemplate)
|
||||
DEPENDS+=+some-package +some-other-package
|
||||
TITLE:=SHORT DESCRIPTION OF YOURMODULE
|
||||
endef
|
||||
|
||||
|
||||
|
||||
A package installation target:
|
||||
|
||||
define Package/luci-app-YOURMODULE/install
|
||||
$(call Package/luci/install/template,$(1),applications/YOURMODULE)
|
||||
endef
|
||||
|
||||
|
||||
A module build instruction:
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_luci-app-YOURMODULE),)
|
||||
PKG_SELECTED_MODULES+=applications/YOURMODULE
|
||||
endif
|
||||
|
||||
|
||||
|
||||
A build package call:
|
||||
|
||||
$(eval $(call BuildPackage,luci-app-YOURMODULE))
|
||||
|
153
ModulesHowTo.md
Normal file
153
ModulesHowTo.md
Normal file
|
@ -0,0 +1,153 @@
|
|||
*Note:* If you plan to integrate your module into LuCI, you should read the [wiki:Documentation/Modules Module Reference] before.
|
||||
|
||||
This tutorial describes how to write your own modules for the LuCI WebUI.
|
||||
For this tutorial we refer to your LuCI installation directory as *lucidir_' (/usr/lib/lua/luci if you are working with an installed version) and assume your LuCI installation is reachable through your webserver via '_/cgi-bin/luci*.
|
||||
|
||||
If you are working with the development environment replace *lucidir_' with '''''/path/to/your/luci/checkout''/applications/myapplication/luasrc''' (this is a default empty module you can use for your experiments) and your LuCI installation can probably be reached via http://localhost:8080/luci/ after you ran '_make runhttpd*.
|
||||
|
||||
|
||||
|
||||
# Show me the way (The dispatching process)
|
||||
To write a module you need to understand the basics of the dispatching process in LuCI.
|
||||
LuCI uses a dispatching tree that will be built by executing the index-Function of every available controller.
|
||||
The CGI-environment variable *PATH_INFO* will be used as the path in this dispatching tree, e.g.: /cgi-bin/luci/foo/bar/baz
|
||||
will be resolved to foo.bar.baz
|
||||
|
||||
To register a function in the dispatching tree, you can use the *entry*-function of _luci.dispatcher_. entry takes 4 arguments (2 are optional):
|
||||
|
||||
entry(path, target, title=nil, order=nil)
|
||||
|
||||
|
||||
* *path* is a table that describes the position in the dispatching tree: For example a path of {"foo", "bar", "baz"} would insert your node in foo.bar.baz.
|
||||
* *target* describes the action that will be taken when a user requests the node. There are several predefined ones of which the 3 most important (call, template, cbi) are described later on on this page
|
||||
* *title* defines the title that will be visible to the user in the menu (optional)
|
||||
* *order* is a number with which nodes on the same level will be sorted in the menu (optional)
|
||||
|
||||
You can assign more attributes by manipulating the node table returned by the entry-function. A few example attributes:
|
||||
|
||||
* *i18n* defines which translation file should be automatically loaded when the page gets requested
|
||||
* *dependent* protects plugins to be called out of their context if a parent node is missing
|
||||
* *leaf* stops parsing the request at this node and goes no further in the dispatching tree
|
||||
* *sysauth* requires the user to authenticate with a given system user account
|
||||
|
||||
|
||||
# It's all about names (Naming and the module file)
|
||||
Now that you know the basics about dispatching, we can start writing modules. But before you have to choose the category and name of your new digital child.
|
||||
|
||||
We assume you want to create a new application "myapp" with a module "mymodule".
|
||||
|
||||
So you have to create a new subdirectory *_lucidir''/controller/myapp''' with a file '_mymodule.lua* with the following content:
|
||||
|
||||
module("luci.controller.myapp.mymodule", package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
end
|
||||
|
||||
|
||||
The first line is required for Lua to correctly identify the module and create its scope.
|
||||
The index-Function will be used to register actions in the dispatching tree.
|
||||
|
||||
|
||||
|
||||
# Teaching your new child (Actions)
|
||||
So it is there and has a name but it has no actions.
|
||||
|
||||
We assume you want to reuse your module myapp.mymodule that you begun in the last step.
|
||||
|
||||
|
||||
## Actions
|
||||
Reopen *_lucidir_/controller/myapp/mymodule.lua* and just add a function to it so that its content looks like this example:
|
||||
|
||||
|
||||
module("luci.controller.myapp.mymodule", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"click", "here", "now"}, call("action_tryme"), "Click here", 10).dependent=false
|
||||
end
|
||||
|
||||
function action_tryme()
|
||||
luci.http.prepare_content("text/plain")
|
||||
luci.http.write("Haha, rebooting now...")
|
||||
luci.sys.reboot()
|
||||
end
|
||||
|
||||
|
||||
And now type */cgi-bin/luci/click/here/now_' ('_[http://localhost:8080/luci/click/here/now]* if you are using the development environment) in your browser.
|
||||
|
||||
You see these action functions simple have to be added to a dispatching entry.
|
||||
|
||||
As you might or might not know: CGI specification requires you to send a Content-Type header before you can send your content. You will find several shortcuts (like the one used above) as well as redirecting functions in the module *luci.http*
|
||||
|
||||
## Views
|
||||
If you only want to show the user a text or some interesting familiy photos it may be enough to use a HTML-template. These templates can also include some Lua code but be aware that writing whole office suites by only using these templates might be called "dirty" by other developers.
|
||||
|
||||
Now let's create a little template *_lucidir_/view/myapp-mymodule/helloworld.htm* with the content:
|
||||
|
||||
|
||||
<%+header%>
|
||||
<h1><%:Hello World%></h1>
|
||||
<%+footer%>
|
||||
|
||||
|
||||
|
||||
and add the following line to the index-Function of your module file.
|
||||
|
||||
entry({"my", "new", "template"}, template("myapp-mymodule/helloworld"), "Hello world", 20).dependent=false
|
||||
|
||||
|
||||
Now type */cgi-bin/luci/my/new/template_' ('_[http://localhost:8080/luci/my/new/template]* if you are using the development environment) in your browser.
|
||||
|
||||
You may notice those fancy <% %>-Tags, these are [wiki:Documentation/Templates|template markups] used by the LuCI template processor.
|
||||
It is always good to include header and footer at the beginning and end of a template as those create the default design and menu.
|
||||
|
||||
## <a name=cbimodels></a> CBI models
|
||||
The CBI is one of the uber coolest features of LuCI. It creates a formular based user interface and saves its contents to a specific UCI config file. You only have to describe the structure of the configuration file in a CBI model file and Luci does the rest of the work. This includes generating, parsing and validating a XHTML form and reading and writing the UCI file.
|
||||
|
||||
So let's be serious at least for this paragraph and create a real pratical example *_lucidir_/model/cbi/myapp-mymodule/netifaces.lua* with the following contents:
|
||||
|
||||
|
||||
m = Map("network", "Network") -- We want to edit the uci config file /etc/config/network
|
||||
|
||||
s = m:section(TypedSection, "interface", "Interfaces") -- Especially the "interface"-sections
|
||||
s.addremove = true -- Allow the user to create and remove the interfaces
|
||||
function s:filter(value)
|
||||
return value ~= "loopback" and value -- Don't touch loopback
|
||||
end
|
||||
s:depends("proto", "static") -- Only show those with "static"
|
||||
s:depends("proto", "dhcp") -- or "dhcp" as protocol and leave PPPoE and PPTP alone
|
||||
|
||||
p = s:option(ListValue, "proto", "Protocol") -- Creates an element list (select box)
|
||||
p:value("static", "static") -- Key and value pairs
|
||||
p:value("dhcp", "DHCP")
|
||||
p.default = "static"
|
||||
|
||||
s:option(Value, "ifname", "interface", "the physical interface to be used") -- This will give a simple textbox
|
||||
|
||||
s:option(Value, "ipaddr", translate("ip", "IP Address")) -- Ja, das ist eine i18n-Funktion ;-)
|
||||
|
||||
s:option(Value, "netmask", "Netmask"):depends("proto", "static") -- You may remember this "depends" function from above
|
||||
|
||||
mtu = s:option(Value, "mtu", "MTU")
|
||||
mtu.optional = true -- This one is very optional
|
||||
|
||||
dns = s:option(Value, "dns", "DNS-Server")
|
||||
dns:depends("proto", "static")
|
||||
dns.optional = true
|
||||
function dns:validate(value) -- Now, that's nifty, eh?
|
||||
return value:match("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") -- Returns nil if it doesn't match otherwise returns match
|
||||
end
|
||||
|
||||
gw = s:option(Value, "gateway", "Gateway")
|
||||
gw:depends("proto", "static")
|
||||
gw.rmempty = true -- Remove entry if it is empty
|
||||
|
||||
return m -- Returns the map
|
||||
|
||||
|
||||
and of course don't forget to add something like this to your module's index-Function.
|
||||
|
||||
entry({"admin", "network", "interfaces"}, cbi("myapp-mymodule/netifaces"), "Network interfaces", 30).dependent=false
|
||||
|
||||
|
||||
There are many more features, see [wiki:Documentation/CBI the CBI reference] and the modules shipped with LuCI.
|
6
README.md
Normal file
6
README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# LuCI Documentation
|
||||
|
||||
## API Reference
|
||||
|
||||
- [Client side JavaScript APIs](jsapi/index.html)
|
||||
- [Server side Lua APIs](api/index.html)
|
65
Templates.md
Normal file
65
Templates.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
LuCI has a simple regex based template processor which parses HTML-files to Lua functions and allows to store precompiled template files.
|
||||
The simplest form of a template is just an ordinary HTML-file. It will be printed out to the user as is.
|
||||
|
||||
In LuCI every template is an object with an own scope. It can therefore be instantiated and each instance can has a different scope. As every template processor. LuCI supports several special markups. Those are enclosed in `<% %>`-Tags.
|
||||
|
||||
By adding `-` (dash) right after the opening `<%` every whitespace before the markup will be stripped. Adding a `-` right before the closing `%>` will equivalently strip every whitespace behind the markup.
|
||||
|
||||
|
||||
# Builtin functions and markups
|
||||
## Including Lua code
|
||||
*Markup:*
|
||||
|
||||
<% code %>
|
||||
|
||||
|
||||
|
||||
## Writing variables and function values
|
||||
*Syntax:*
|
||||
|
||||
<% write (value) %>
|
||||
|
||||
|
||||
*Short-Markup:*
|
||||
|
||||
<%=value%>
|
||||
|
||||
|
||||
## Including templates
|
||||
*Syntax:*
|
||||
|
||||
<% include (templatename) %>
|
||||
|
||||
|
||||
*Short-Markup:*
|
||||
|
||||
<%+templatename%>
|
||||
|
||||
|
||||
|
||||
## Translating
|
||||
*Syntax:*
|
||||
|
||||
<%= translate("Text to translate") %>
|
||||
|
||||
|
||||
|
||||
*Short-Markup:*
|
||||
|
||||
<%:Text to translate%>
|
||||
|
||||
|
||||
|
||||
## Commenting
|
||||
*Markup:*
|
||||
|
||||
<%# comment %>
|
||||
|
||||
|
||||
# Builtin constants
|
||||
| Name | Value |
|
||||
---------|---------
|
||||
|`REQUEST_URI`|The current URL (without server part)|
|
||||
|`controller`|Path to the Luci main dispatcher|
|
||||
|`resource`|Path to the resource directory|
|
||||
|`media`|Path to the active theme directory|
|
76
ThemesHowTo.md
Normal file
76
ThemesHowTo.md
Normal file
|
@ -0,0 +1,76 @@
|
|||
# HowTo: Create Themes
|
||||
*Note:* You should read the [Module Reference](Modules.md) and the [Template Reference](Templates.md) before.
|
||||
|
||||
We assume you want to call your new theme _mytheme_. Make sure you replace this by your module name every time this is mentionend in this Howto.
|
||||
|
||||
|
||||
|
||||
# Creating the structure
|
||||
At first create a new theme directory *themes/_mytheme_*.
|
||||
|
||||
Create a _Makefile_ inside your theme directory with the following content:
|
||||
|
||||
include ../../build/config.mk
|
||||
include ../../build/module.mk
|
||||
|
||||
|
||||
Create the following directory structure inside your theme directory.
|
||||
* ipkg
|
||||
* htdocs
|
||||
* luci-static
|
||||
* _mytheme_
|
||||
* luasrc
|
||||
* view
|
||||
* themes
|
||||
* _mytheme_
|
||||
* root
|
||||
* etc
|
||||
* uci-defaults
|
||||
|
||||
|
||||
|
||||
# Designing
|
||||
Create two LuCI HTML-Templates named _header.htm'' and ''footer.htm'' under *luasrc/view/themes/''mytheme_*.
|
||||
The _header.htm'' will be included at the beginning of each rendered page and the ''footer.htm_ at the end.
|
||||
So your _header.htm'' will probably contain a DOCTYPE description, headers, the menu and layout of the page and the ''footer.htm_ will close all remaining open tags and may add a footer bar but hey that's your choice you are the designer ;-).
|
||||
|
||||
Just make sure your _header.htm_ *begins* with the following lines:
|
||||
|
||||
<%
|
||||
require("luci.http").prepare_content("text/html")
|
||||
-%>
|
||||
|
||||
|
||||
This makes sure your content will be sent to the client with the right content type. Of course you can adapt _text/html_ to your needs.
|
||||
|
||||
|
||||
Put any stylesheets, Javascripts, images, ... into *htdocs/luci-static/_mytheme_*.
|
||||
You should refer to this directory in your header and footer templates as: _<%=media%>''. That means for a stylesheet *htdocs/luci-static/''mytheme_/cascade.css* you would write:
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<%=media%>/cascade.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
# Making the theme selectable
|
||||
If you are done with your work there are two last steps to do.
|
||||
To make your theme OpenWRT-capable and selectable on the settings page you should now create a file *root/etc/uci-defaults/luci-theme-_mytheme_* with the following contents:
|
||||
|
||||
#!/bin/sh
|
||||
uci batch <<-EOF
|
||||
set luci.themes.MyTheme=/luci-static/mytheme
|
||||
commit luci
|
||||
EOF
|
||||
|
||||
|
||||
and another file *ipkg/postinst* with the following content:
|
||||
|
||||
#!/bin/sh
|
||||
[ -n "${IPKG_INSTROOT}" ] || {
|
||||
( . /etc/uci-defaults/luci-theme-mytheme ) && rm -f /etc/uci-defaults/luci-theme-mytheme
|
||||
}
|
||||
|
||||
|
||||
This is some OpenWRT magic to correctly register the template with LuCI when it gets installed.
|
||||
|
||||
That's all. Now send your theme to the LuCI developers to get it into the development repository - if you like.
|
435
api/index.html
Normal file
435
api/index.html
Normal file
|
@ -0,0 +1,435 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><strong>Index</strong></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
|
||||
|
||||
<h2>Modules</h2>
|
||||
<table class="module_list">
|
||||
<!--<tr><td colspan="2">Modules</td></tr>-->
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.dispatcher.html">luci.dispatcher</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.http.html">luci.http</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.http.conditionals.html">luci.http.conditionals</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.http.date.html">luci.http.date</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.http.mime.html">luci.http.mime</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.i18n.html">luci.i18n</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.ip.html">luci.ip</a></td>
|
||||
<td class="summary">
|
||||
LuCI IP calculation and netlink access library.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.ip.cidr.html">luci.ip.cidr</a></td>
|
||||
<td class="summary">
|
||||
IP CIDR Object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.json.html">luci.json</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.jsonc.html">luci.jsonc</a></td>
|
||||
<td class="summary">
|
||||
LuCI JSON parsing and serialization library.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.jsonc.parser.html">luci.jsonc.parser</a></td>
|
||||
<td class="summary">
|
||||
LuCI JSON parser instance.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.model.ipkg.html">luci.model.ipkg</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.model.uci.html">luci.model.uci</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.rpcc.html">luci.rpcc</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.html">luci.sys</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.init.html">luci.sys.init</a></td>
|
||||
<td class="summary">
|
||||
|
||||
LuCI system utilities / init related functions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.iptparser.html">luci.sys.iptparser</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.net.html">luci.sys.net</a></td>
|
||||
<td class="summary">
|
||||
|
||||
LuCI system utilities / network related functions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.process.html">luci.sys.process</a></td>
|
||||
<td class="summary">
|
||||
|
||||
LuCI system utilities / process related functions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.user.html">luci.sys.user</a></td>
|
||||
<td class="summary">
|
||||
|
||||
LuCI system utilities / user related functions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.sys.wifi.html">luci.sys.wifi</a></td>
|
||||
<td class="summary">
|
||||
|
||||
LuCI system utilities / wifi related functions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.util.html">luci.util</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/luci.xml.html">luci.xml</a></td>
|
||||
<td class="summary"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.html">nixio</a></td>
|
||||
<td class="summary">
|
||||
General POSIX IO library.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a></td>
|
||||
<td class="summary">
|
||||
Changes and improvements.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.CryptoHash.html">nixio.CryptoHash</a></td>
|
||||
<td class="summary">
|
||||
Cryptographical Hash and HMAC object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.File.html">nixio.File</a></td>
|
||||
<td class="summary">
|
||||
Large File Object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.README.html">nixio.README</a></td>
|
||||
<td class="summary">
|
||||
General Information.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.Socket.html">nixio.Socket</a></td>
|
||||
<td class="summary">
|
||||
Socket Object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.TLSContext.html">nixio.TLSContext</a></td>
|
||||
<td class="summary">
|
||||
Transport Layer Security Context Object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.TLSSocket.html">nixio.TLSSocket</a></td>
|
||||
<td class="summary">
|
||||
TLS Socket Object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a></td>
|
||||
<td class="summary">
|
||||
Unified high-level I/O utility API for Files, Sockets and TLS-Sockets.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.bin.html">nixio.bin</a></td>
|
||||
<td class="summary">
|
||||
Binary operations and conversion.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.bit.html">nixio.bit</a></td>
|
||||
<td class="summary">
|
||||
Bitfield operators and mainpulation functions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.crypto.html">nixio.crypto</a></td>
|
||||
<td class="summary">
|
||||
Cryptographical library.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name"><a href="modules/nixio.fs.html">nixio.fs</a></td>
|
||||
<td class="summary">
|
||||
Low-level and high-level filesystem manipulation library.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
285
api/luadoc.css
Normal file
285
api/luadoc.css
Normal 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
|
||||
|
1149
api/modules/luci.dispatcher.html
Normal file
1149
api/modules/luci.dispatcher.html
Normal file
File diff suppressed because it is too large
Load diff
556
api/modules/luci.http.conditionals.html
Normal file
556
api/modules/luci.http.conditionals.html
Normal file
|
@ -0,0 +1,556 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.http.conditionals</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.http.conditionals</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#if_match">if_match</a> (req, stat)</td>
|
||||
<td class="summary">
|
||||
|
||||
14.24 / If-Match
|
||||
|
||||
Test whether the given message object contains an "If-Match" header and
|
||||
compare it against the given stat object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#if_modified_since">if_modified_since</a> (req, stat)</td>
|
||||
<td class="summary">
|
||||
|
||||
14.25 / If-Modified-Since
|
||||
|
||||
Test whether the given message object contains an "If-Modified-Since" header
|
||||
and compare it against the given stat object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#if_none_match">if_none_match</a> (req, stat)</td>
|
||||
<td class="summary">
|
||||
|
||||
14.26 / If-None-Match
|
||||
|
||||
Test whether the given message object contains an "If-None-Match" header and
|
||||
compare it against the given stat object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#if_range">if_range</a> (req, stat)</td>
|
||||
<td class="summary">
|
||||
|
||||
14.27 / If-Range
|
||||
|
||||
The If-Range header is currently not implemented due to the lack of general
|
||||
byte range stuff in luci.http.protocol .</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#if_unmodified_since">if_unmodified_since</a> (req, stat)</td>
|
||||
<td class="summary">
|
||||
|
||||
14.28 / If-Unmodified-Since
|
||||
|
||||
Test whether the given message object contains an "If-Unmodified-Since"
|
||||
header and compare it against the given stat object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#mk_etag">mk_etag</a> (stat)</td>
|
||||
<td class="summary">
|
||||
|
||||
Implement 14.19 / ETag.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="if_match"></a><strong>if_match</strong> (req, stat)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
14.24 / If-Match
|
||||
|
||||
Test whether the given message object contains an "If-Match" header and
|
||||
compare it against the given stat object.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
req: HTTP request message object
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stat: A file.stat object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating whether the precondition is ok
|
||||
|
||||
<li>Alternative status code if the precondition failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="if_modified_since"></a><strong>if_modified_since</strong> (req, stat)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
14.25 / If-Modified-Since
|
||||
|
||||
Test whether the given message object contains an "If-Modified-Since" header
|
||||
and compare it against the given stat object.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
req: HTTP request message object
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stat: A file.stat object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating whether the precondition is ok
|
||||
|
||||
<li>Alternative status code if the precondition failed
|
||||
|
||||
<li>Table containing extra HTTP headers if the precondition failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="if_none_match"></a><strong>if_none_match</strong> (req, stat)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
14.26 / If-None-Match
|
||||
|
||||
Test whether the given message object contains an "If-None-Match" header and
|
||||
compare it against the given stat object.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
req: HTTP request message object
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stat: A file.stat object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating whether the precondition is ok
|
||||
|
||||
<li>Alternative status code if the precondition failed
|
||||
|
||||
<li>Table containing extra HTTP headers if the precondition failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="if_range"></a><strong>if_range</strong> (req, stat)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
14.27 / If-Range
|
||||
|
||||
The If-Range header is currently not implemented due to the lack of general
|
||||
byte range stuff in luci.http.protocol . This function will always return
|
||||
false, 412 to indicate a failed precondition.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
req: HTTP request message object
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stat: A file.stat object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating whether the precondition is ok
|
||||
|
||||
<li>Alternative status code if the precondition failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="if_unmodified_since"></a><strong>if_unmodified_since</strong> (req, stat)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
14.28 / If-Unmodified-Since
|
||||
|
||||
Test whether the given message object contains an "If-Unmodified-Since"
|
||||
header and compare it against the given stat object.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
req: HTTP request message object
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stat: A file.stat object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating whether the precondition is ok
|
||||
|
||||
<li>Alternative status code if the precondition failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="mk_etag"></a><strong>mk_etag</strong> (stat)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Implement 14.19 / ETag.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
stat: A file.stat structure
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the generated tag suitable for ETag headers
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
410
api/modules/luci.http.date.html
Normal file
410
api/modules/luci.http.date.html
Normal file
|
@ -0,0 +1,410 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.http.date</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.http.date</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#compare">compare</a> (d1, d2)</td>
|
||||
<td class="summary">
|
||||
|
||||
Compare two dates which can either be unix epoch times or HTTP date strings.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#to_http">to_http</a> (time)</td>
|
||||
<td class="summary">
|
||||
|
||||
Convert the given unix epoch time to valid HTTP date string.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#to_unix">to_unix</a> (data)</td>
|
||||
<td class="summary">
|
||||
|
||||
Parse given HTTP date string and convert it to unix epoch time.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#tz_offset">tz_offset</a> (tz)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return the time offset in seconds between the UTC and given time zone.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="compare"></a><strong>compare</strong> (d1, d2)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Compare two dates which can either be unix epoch times or HTTP date strings.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
d1: The first date or epoch time to compare
|
||||
</li>
|
||||
|
||||
<li>
|
||||
d2: The first date or epoch time to compare
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>-1 - if d1 is lower then d2
|
||||
|
||||
<li>0 - if both dates are equal
|
||||
|
||||
<li>1 - if d1 is higher then d2
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="to_http"></a><strong>to_http</strong> (time)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Convert the given unix epoch time to valid HTTP date string.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
time: Unix epoch time
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the formatted date
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="to_unix"></a><strong>to_unix</strong> (data)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Parse given HTTP date string and convert it to unix epoch time.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
data: String containing the date
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Unix epoch time
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="tz_offset"></a><strong>tz_offset</strong> (tz)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return the time offset in seconds between the UTC and given time zone.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
tz: Symbolic or numeric timezone specifier
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Time offset to UTC in seconds
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
1271
api/modules/luci.http.html
Normal file
1271
api/modules/luci.http.html
Normal file
File diff suppressed because it is too large
Load diff
326
api/modules/luci.http.mime.html
Normal file
326
api/modules/luci.http.mime.html
Normal file
|
@ -0,0 +1,326 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.http.mime</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.http.mime</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#to_ext">to_ext</a> (mimetype)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return corresponding extension for a given mime type or nil if the
|
||||
|
||||
given mime-type is unknown.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#to_mime">to_mime</a> (filename)</td>
|
||||
<td class="summary">
|
||||
|
||||
Extract extension from a filename and return corresponding mime-type or
|
||||
|
||||
"application/octet-stream" if the extension is unknown.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="to_ext"></a><strong>to_ext</strong> (mimetype)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return corresponding extension for a given mime type or nil if the
|
||||
|
||||
given mime-type is unknown.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
mimetype: The mimetype to retrieve the extension from
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String with the extension or nil for unknown type
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="to_mime"></a><strong>to_mime</strong> (filename)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Extract extension from a filename and return corresponding mime-type or
|
||||
|
||||
"application/octet-stream" if the extension is unknown.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
filename: The filename for which the mime type is guessed
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containign the determined mime type
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
395
api/modules/luci.i18n.html
Normal file
395
api/modules/luci.i18n.html
Normal 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.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.i18n</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.i18n</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#dump">dump</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Return all currently loaded translation strings as a key-value table.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#setlanguage">setlanguage</a> (lang)</td>
|
||||
<td class="summary">
|
||||
|
||||
Set the context default translation language.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#translate">translate</a> (key)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return the translated value for a specific translation key.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#translatef">translatef</a> (key, ...)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return the translated value for a specific translation key and use it as sprintf pattern.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="dump"></a><strong>dump</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return all currently loaded translation strings as a key-value table. The key is the
|
||||
hexadecimal representation of the translation key while the value is the translated
|
||||
text content.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Key-value translation string table.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="setlanguage"></a><strong>setlanguage</strong> (lang)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Set the context default translation language.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
lang: An IETF/BCP 47 language tag or ISO3166 country code, e.g. "en-US" or "de"
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
The effective loaded language, e.g. "en" for "en-US" - or nil on failure
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="translate"></a><strong>translate</strong> (key)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return the translated value for a specific translation key.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
key: Default translation text
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Translated string
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="translatef"></a><strong>translatef</strong> (key, ...)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return the translated value for a specific translation key and use it as sprintf pattern.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
key: Default translation text
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: Format parameters
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Translated and formatted string
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
1515
api/modules/luci.ip.cidr.html
Normal file
1515
api/modules/luci.ip.cidr.html
Normal file
File diff suppressed because it is too large
Load diff
1221
api/modules/luci.ip.html
Normal file
1221
api/modules/luci.ip.html
Normal file
File diff suppressed because it is too large
Load diff
598
api/modules/luci.json.html
Normal file
598
api/modules/luci.json.html
Normal file
|
@ -0,0 +1,598 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.json</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>luci.json</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#ActiveDecoder">ActiveDecoder</a> (customnull)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create a new Active JSON-Decoder.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#ActiveDecoder.get">ActiveDecoder:get</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Fetches one JSON-object from given source
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Decoder">Decoder</a> (customnull)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create a new JSON-Decoder.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Decoder.get">Decoder:get</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Get the decoded data packets after the rawdata has been sent to the sink.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Decoder.sink">Decoder:sink</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Create an LTN12 sink from the decoder object which accepts the JSON-Data.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Encoder">Encoder</a> (data, buffersize, fastescape)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create a new JSON-Encoder.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Encoder.source">Encoder:source</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Create an LTN12 source providing the encoded JSON-Data.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#decode">decode</a> (json)</td>
|
||||
<td class="summary">
|
||||
|
||||
Directly decode a JSON string
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#encode">encode</a> (obj)</td>
|
||||
<td class="summary">
|
||||
|
||||
Direcly encode a Lua object into a JSON string.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#null">null</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Null replacement function
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="ActiveDecoder"></a><strong>ActiveDecoder</strong> (customnull)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create a new Active JSON-Decoder.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
customnull: Use luci.json.null instead of nil for decoding null
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Active JSON-Decoder
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="ActiveDecoder.get"></a><strong>ActiveDecoder:get</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Fetches one JSON-object from given source
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Decoded object
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="Decoder"></a><strong>Decoder</strong> (customnull)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create a new JSON-Decoder.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
customnull: Use luci.json.null instead of nil for decoding null
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
JSON-Decoder
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="Decoder.get"></a><strong>Decoder:get</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Get the decoded data packets after the rawdata has been sent to the sink.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Decoded data
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="Decoder.sink"></a><strong>Decoder:sink</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create an LTN12 sink from the decoder object which accepts the JSON-Data.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
LTN12 sink
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="Encoder"></a><strong>Encoder</strong> (data, buffersize, fastescape)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create a new JSON-Encoder.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
data: Lua-Object to be encoded.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
buffersize: Blocksize of returned data source.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
fastescape: Use non-standard escaping (don't escape control chars)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
JSON-Encoder
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="Encoder.source"></a><strong>Encoder:source</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create an LTN12 source providing the encoded JSON-Data.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
LTN12 source
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="decode"></a><strong>decode</strong> (json)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Directly decode a JSON string
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
json: JSON-String
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Lua object
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="encode"></a><strong>encode</strong> (obj)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Direcly encode a Lua object into a JSON string.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
obj: Lua Object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
JSON string
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="null"></a><strong>null</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Null replacement function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
null
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
397
api/modules/luci.jsonc.html
Normal file
397
api/modules/luci.jsonc.html
Normal file
|
@ -0,0 +1,397 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.jsonc</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.jsonc</code></h1>
|
||||
|
||||
<p>
|
||||
LuCI JSON parsing and serialization library.
|
||||
The luci.jsonc class is a high level Lua binding to the JSON-C library to
|
||||
allow reading and writing JSON data with minimal overhead.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#new">new</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Construct a new luci.jsonc.parser instance.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#parse">parse</a> (json)</td>
|
||||
<td class="summary">
|
||||
|
||||
Parse a complete JSON string and convert it into a Lua data structure.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#stringify">stringify</a> (data, pretty)</td>
|
||||
<td class="summary">
|
||||
|
||||
Convert given Lua data into a JSON string.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="new"></a><strong>new</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Construct a new luci.jsonc.parser instance.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<code>parser = luci.jsonc.new()</code>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
A <code>luci.jsonc.parser</code> object representing a JSON-C tokener.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="parse"></a><strong>parse</strong> (json)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Parse a complete JSON string and convert it into a Lua data structure.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
json: A string containing the JSON data to parse, must be either a
|
||||
JSON array or a JSON object.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>data = luci.jsonc.parse('{ "name": "John", "age": 34 }')
|
||||
print(data.name) -- "John"</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
On success, a table containing the parsed JSON data is returned, on
|
||||
failure the function returns <code>nil</code> and a string containing the reason of
|
||||
the parse error.
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#stringify">
|
||||
stringify
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="stringify"></a><strong>stringify</strong> (data, pretty)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Convert given Lua data into a JSON string.
|
||||
|
||||
This function recursively converts the given Lua data into a JSON string,
|
||||
ignoring any unsupported data. Lua tables are converted into JSON arrays if they
|
||||
only contain integer keys, mixed tables are turned into JSON objects with any
|
||||
existing numeric keys converted into strings.
|
||||
|
||||
Lua functions, coroutines and userdata objects are ignored and Lua numbers are
|
||||
converted to integers if they do not contain fractional values.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
data: The Lua data to convert, can be a table, string, boolean or number.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
pretty: A boolean value indicating whether the resulting JSON should be
|
||||
pretty printed.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>json = luci.jsonc.stringify({ item = true, values = { 1, 2, 3 } })
|
||||
print(json) -- '{"item":true,"values":[1,2,3]}'</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Returns a string containing the JSON representation of the given Lua
|
||||
data.
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#parse">
|
||||
parse
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
495
api/modules/luci.jsonc.parser.html
Normal file
495
api/modules/luci.jsonc.parser.html
Normal file
|
@ -0,0 +1,495 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.jsonc.parser</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>luci.jsonc.parser</code></h1>
|
||||
|
||||
<p>
|
||||
LuCI JSON parser instance.
|
||||
A JSON parser instance is useful to parse JSON data chunk by chunk, without
|
||||
the need to assemble all data in advance.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#parser.parse">parser:parse</a> (json)</td>
|
||||
<td class="summary">
|
||||
|
||||
Parses one chunk of JSON data.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#parser.get">parser:get</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Convert parsed JSON data into Lua table.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#parser.set">parser:set</a> (data)</td>
|
||||
<td class="summary">
|
||||
|
||||
Put Lua data into the parser.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#parser.sink">parser:sink</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Generate an ltn12-compatible sink.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#parser.stringify">parser:stringify</a> (pretty)</td>
|
||||
<td class="summary">
|
||||
|
||||
Serialize current parser state as JSON.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="parser.parse"></a><strong>parser:parse</strong> (json)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Parses one chunk of JSON data.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
json: String containing the JSON fragment to parse
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>parser = luci.jsonc.new()
|
||||
|
||||
while true do
|
||||
chunk = ... -- fetch a cunk of data, e.g. from a socket
|
||||
finish, errmsg = <b>parser.parse(chunk)</b>
|
||||
|
||||
if finish == nil then
|
||||
error("Cannot parse JSON: " .. errmsg)
|
||||
end
|
||||
|
||||
if finish == true then
|
||||
break
|
||||
end
|
||||
end</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
<ul>
|
||||
<li><code>true</code> if a complete JSON object has been parsed and no further input is
|
||||
expected.</li>
|
||||
<li><code>false</code> if further input is required</li>
|
||||
<li><code>nil</code> if an error was encountered while parsing the current chunk.
|
||||
In this case a string describing the parse error is returned as second
|
||||
value.</li></ul>
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#parser.get">
|
||||
parser:get
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="parser.get"></a><strong>parser:get</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Convert parsed JSON data into Lua table.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>parser = luci.jsonc.new()
|
||||
parser:parse('{ "example": "test" }')
|
||||
|
||||
data = parser:get()
|
||||
print(data.example) -- "test"</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Parsed JSON object converted into a Lua table or <code>nil</code> if the parser
|
||||
didn't finish or encountered an error.
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#parser.parse">
|
||||
parser:parse
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="parser.set"></a><strong>parser:set</strong> (data)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Put Lua data into the parser.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
data: Lua data to put into the parser object. The data is converted to an
|
||||
internal JSON representation that can be dumped with <code>stringify()</code>.
|
||||
The conversion follows the rules described in <code>luci.jsonc.stringify</code>.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>parser = luci.jsonc.new()
|
||||
parser:set({ "some", "data" })</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Nothing is returned.
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#parser.stringify">
|
||||
parser:stringify
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="parser.sink"></a><strong>parser:sink</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Generate an ltn12-compatible sink.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>parser = luci.jsonc.new()
|
||||
ltn12.pump.all(ltn12.source.file(io.input()), parser:sink())
|
||||
print(parser:get())</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Returns a function that can be used as an ltn12 sink.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="parser.stringify"></a><strong>parser:stringify</strong> (pretty)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Serialize current parser state as JSON.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pretty: A boolean value indicating whether the resulting JSON should be pretty printed.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre>parser = luci.jsonc.new()
|
||||
parser:parse('{ "example": "test" }')
|
||||
print(parser:serialize()) -- '{"example":"test"}'</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Returns the serialized JSON data of this parser instance.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
734
api/modules/luci.model.ipkg.html
Normal file
734
api/modules/luci.model.ipkg.html
Normal file
|
@ -0,0 +1,734 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.model.ipkg</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.model.ipkg</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#compare_versions">compare_versions</a> (ver1, ver2, comp)</td>
|
||||
<td class="summary">
|
||||
|
||||
lua version of opkg compare-versions
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#find">find</a> (pat, cb)</td>
|
||||
<td class="summary">
|
||||
|
||||
Find packages that match the given pattern.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#info">info</a> (pkg)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return information about installed and available packages.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#install">install</a> (...)</td>
|
||||
<td class="summary">
|
||||
|
||||
Install one or more packages.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#installed">installed</a> (pkg)</td>
|
||||
<td class="summary">
|
||||
|
||||
Determine whether a given package is installed.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#list_all">list_all</a> (pat, cb)</td>
|
||||
<td class="summary">
|
||||
|
||||
List all packages known to opkg.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#list_installed">list_installed</a> (pat, cb)</td>
|
||||
<td class="summary">
|
||||
|
||||
List installed packages.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#overlay_root">overlay_root</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Determines the overlay root used by opkg.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#remove">remove</a> (...)</td>
|
||||
<td class="summary">
|
||||
|
||||
Remove one or more packages.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#status">status</a> (pkg)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return the package status of one or more packages.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#update">update</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Update package lists.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#upgrade">upgrade</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Upgrades all installed packages.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="compare_versions"></a><strong>compare_versions</strong> (ver1, ver2, comp)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
lua version of opkg compare-versions
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
ver1: string version 1
|
||||
</li>
|
||||
|
||||
<li>
|
||||
ver2: string version 2
|
||||
</li>
|
||||
|
||||
<li>
|
||||
comp: string compare versions using
|
||||
"<=" or "<" lower-equal
|
||||
">" or ">=" greater-equal
|
||||
"=" equal
|
||||
"<<" lower
|
||||
">>" greater
|
||||
"~=" not equal
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating the status of the compare
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="find"></a><strong>find</strong> (pat, cb)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Find packages that match the given pattern.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pat: Find packages whose names or descriptions match this pattern, nil results in zero results
|
||||
</li>
|
||||
|
||||
<li>
|
||||
cb: Callback function invoked for each patckage, receives name, version and description as arguments
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
nothing
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="info"></a><strong>info</strong> (pkg)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return information about installed and available packages.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pkg: Limit output to a (set of) packages
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing package information
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="install"></a><strong>install</strong> (...)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Install one or more packages.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
...: List of packages to install
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating the status of the action
|
||||
|
||||
<li>OPKG return code, STDOUT and STDERR
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="installed"></a><strong>installed</strong> (pkg)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Determine whether a given package is installed.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pkg: Package
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="list_all"></a><strong>list_all</strong> (pat, cb)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
List all packages known to opkg.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pat: Only find packages matching this pattern, nil lists all packages
|
||||
</li>
|
||||
|
||||
<li>
|
||||
cb: Callback function invoked for each package, receives name, version and description as arguments
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
nothing
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="list_installed"></a><strong>list_installed</strong> (pat, cb)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
List installed packages.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pat: Only find packages matching this pattern, nil lists all packages
|
||||
</li>
|
||||
|
||||
<li>
|
||||
cb: Callback function invoked for each package, receives name, version and description as arguments
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
nothing
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="overlay_root"></a><strong>overlay_root</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Determines the overlay root used by opkg.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the directory path of the overlay root.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="remove"></a><strong>remove</strong> (...)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Remove one or more packages.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
...: List of packages to install
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating the status of the action
|
||||
|
||||
<li>OPKG return code, STDOUT and STDERR
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="status"></a><strong>status</strong> (pkg)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return the package status of one or more packages.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pkg: Limit output to a (set of) packages
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing package status information
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="update"></a><strong>update</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Update package lists.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating the status of the action
|
||||
|
||||
<li>OPKG return code, STDOUT and STDERR
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="upgrade"></a><strong>upgrade</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Upgrades all installed packages.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating the status of the action
|
||||
|
||||
<li>OPKG return code, STDOUT and STDERR
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
1635
api/modules/luci.model.uci.html
Normal file
1635
api/modules/luci.model.uci.html
Normal file
File diff suppressed because it is too large
Load diff
328
api/modules/luci.rpcc.html
Normal file
328
api/modules/luci.rpcc.html
Normal file
|
@ -0,0 +1,328 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.rpcc</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>luci.rpcc</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Client.proxy">Client:proxy</a> (prefix)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create a transparent RPC proxy.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Client.request">Client:request</a> (method, params, notification)</td>
|
||||
<td class="summary">
|
||||
|
||||
Request an RP call and get the response.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="Client.proxy"></a><strong>Client:proxy</strong> (prefix)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create a transparent RPC proxy.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
prefix: Method prefix
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
RPC Proxy object
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="Client.request"></a><strong>Client:request</strong> (method, params, notification)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Request an RP call and get the response.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
method: Remote method
|
||||
</li>
|
||||
|
||||
<li>
|
||||
params: Parameters
|
||||
</li>
|
||||
|
||||
<li>
|
||||
notification: Notification only?
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
response
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
281
api/modules/luci.rpcc.ruci.html
Normal file
281
api/modules/luci.rpcc.ruci.html
Normal file
|
@ -0,0 +1,281 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.rpcc.ruci</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>luci.rpcc.ruci</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#factory">factory</a> (rpccl)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create a new UCI over RPC proxy.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="factory"></a><strong>factory</strong> (rpccl)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create a new UCI over RPC proxy.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
rpccl: RPC client
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Network transparent UCI module
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
645
api/modules/luci.sys.html
Normal file
645
api/modules/luci.sys.html
Normal file
|
@ -0,0 +1,645 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.sys</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#call">call</a> (...)</td>
|
||||
<td class="summary">
|
||||
|
||||
Execute a given shell command and return the error code
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#dmesg">dmesg</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieves the output of the "dmesg" command.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#exec">exec</a> (command)</td>
|
||||
<td class="summary">
|
||||
|
||||
Execute a given shell command and capture its standard output
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#getenv">getenv</a> (var)</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieve environment variables.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#hostname">hostname</a> (String)</td>
|
||||
<td class="summary">
|
||||
|
||||
Get or set the current hostname.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#httpget">httpget</a> (url, stream, target)</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns the contents of a documented referred by an URL.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#mounts">mounts</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieve information about currently mounted file systems.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#reboot">reboot</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Initiate a system reboot.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#syslog">syslog</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieves the output of the "logread" command.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#uniqueid">uniqueid</a> (bytes)</td>
|
||||
<td class="summary">
|
||||
|
||||
Generates a random id with specified length.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#uptime">uptime</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns the current system uptime stats.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="call"></a><strong>call</strong> (...)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Execute a given shell command and return the error code
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
...: Command to call
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Error code of the command
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="dmesg"></a><strong>dmesg</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieves the output of the "dmesg" command.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the current log buffer
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="exec"></a><strong>exec</strong> (command)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Execute a given shell command and capture its standard output
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
command: Command to call
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the return the output of the command
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="getenv"></a><strong>getenv</strong> (var)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieve environment variables. If no variable is given then a table
|
||||
|
||||
containing the whole environment is returned otherwise this function returns
|
||||
the corresponding string value for the given name or nil if no such variable
|
||||
exists.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
var: Name of the environment variable to retrieve (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>String containing the value of the specified variable
|
||||
|
||||
<li>Table containing all variables if no variable name is given
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="hostname"></a><strong>hostname</strong> (String)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Get or set the current hostname.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
String: containing a new hostname to set (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the system hostname
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="httpget"></a><strong>httpget</strong> (url, stream, target)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns the contents of a documented referred by an URL.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
url: The URL to retrieve
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stream: Return a stream instead of a buffer
|
||||
</li>
|
||||
|
||||
<li>
|
||||
target: Directly write to target file name
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the contents of given the URL
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="mounts"></a><strong>mounts</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieve information about currently mounted file systems.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing mount information
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="reboot"></a><strong>reboot</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Initiate a system reboot.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Return value of os.execute()
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="syslog"></a><strong>syslog</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieves the output of the "logread" command.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing the current log buffer
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="uniqueid"></a><strong>uniqueid</strong> (bytes)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Generates a random id with specified length.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
bytes: Number of bytes for the unique id
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing hex encoded id
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="uptime"></a><strong>uptime</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns the current system uptime stats.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String containing total uptime in seconds
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
516
api/modules/luci.sys.init.html
Normal file
516
api/modules/luci.sys.init.html
Normal file
|
@ -0,0 +1,516 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys.init</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.sys.init</code></h1>
|
||||
|
||||
<p>
|
||||
|
||||
LuCI system utilities / init related functions.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.disable">disable</a> (name)</td>
|
||||
<td class="summary">
|
||||
|
||||
Disable the given init script
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.enable">enable</a> (name)</td>
|
||||
<td class="summary">
|
||||
|
||||
Enable the given init script
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.enabled">enabled</a> (name)</td>
|
||||
<td class="summary">
|
||||
|
||||
Test whether the given init script is enabled
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.index">index</a> (name)</td>
|
||||
<td class="summary">
|
||||
|
||||
Get the index of he given init script
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.names">names</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Get the names of all installed init scripts
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.start">start</a> (name)</td>
|
||||
<td class="summary">
|
||||
|
||||
Start the given init script
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#init.stop">stop</a> (name)</td>
|
||||
<td class="summary">
|
||||
|
||||
Stop the given init script
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.disable"></a><strong>disable</strong> (name)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Disable the given init script
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
name: Name of the init script
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating success
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.enable"></a><strong>enable</strong> (name)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Enable the given init script
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
name: Name of the init script
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating success
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.enabled"></a><strong>enabled</strong> (name)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Test whether the given init script is enabled
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
name: Name of the init script
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating whether init is enabled
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.index"></a><strong>index</strong> (name)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Get the index of he given init script
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
name: Name of the init script
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Numeric index value
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.names"></a><strong>names</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Get the names of all installed init scripts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing the names of all inistalled init scripts
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.start"></a><strong>start</strong> (name)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Start the given init script
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
name: Name of the init script
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating success
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="init.stop"></a><strong>stop</strong> (name)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Stop the given init script
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
name: Name of the init script
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating success
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
466
api/modules/luci.sys.iptparser.html
Normal file
466
api/modules/luci.sys.iptparser.html
Normal file
|
@ -0,0 +1,466 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys.iptparser</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>luci.sys.iptparser</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#IptParser">IptParser</a> (family)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create a new iptables parser object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#IptParser.chain">IptParser:chain</a> (table, chain)</td>
|
||||
<td class="summary">
|
||||
|
||||
Return the given firewall chain within the given table name.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#IptParser.chains">IptParser:chains</a> (table)</td>
|
||||
<td class="summary">
|
||||
|
||||
Find the names of all chains within the given table name.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#IptParser.is_custom_target">IptParser:is_custom_target</a> (target)</td>
|
||||
<td class="summary">
|
||||
|
||||
Test whether the given target points to a custom chain.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#IptParser.resync">IptParser:resync</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Rebuild the internal lookup table, for example when rules have changed
|
||||
|
||||
through external commands.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#IptParser.tables">IptParser:tables</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Find the names of all tables.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="IptParser"></a><strong>IptParser</strong> (family)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create a new iptables parser object.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
family: Number specifying the address family. 4 for IPv4, 6 for IPv6
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
IptParser instance
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="IptParser.chain"></a><strong>IptParser:chain</strong> (table, chain)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return the given firewall chain within the given table name.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
table: String containing the table name
|
||||
</li>
|
||||
|
||||
<li>
|
||||
chain: String containing the chain name
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing the fields "policy", "packets", "bytes"
|
||||
and "rules". The "rules" field is a table of rule tables.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="IptParser.chains"></a><strong>IptParser:chains</strong> (table)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Find the names of all chains within the given table name.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
table: String containing the table name
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of chain names in the order they occur.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="IptParser.is_custom_target"></a><strong>IptParser:is_custom_target</strong> (target)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Test whether the given target points to a custom chain.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
target: String containing the target action
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating whether target is a custom chain.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="IptParser.resync"></a><strong>IptParser:resync</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Rebuild the internal lookup table, for example when rules have changed
|
||||
|
||||
through external commands.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
nothing
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="IptParser.tables"></a><strong>IptParser:tables</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Find the names of all tables.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of table names.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
601
api/modules/luci.sys.net.html
Normal file
601
api/modules/luci.sys.net.html
Normal file
|
@ -0,0 +1,601 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys.net</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.sys.net</code></h1>
|
||||
|
||||
<p>
|
||||
|
||||
LuCI system utilities / network related functions.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.arptable">arptable</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns the current arp-table entries as two-dimensional table.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.conntrack">conntrack</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns conntrack information
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.deviceinfo">deviceinfo</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Return information about available network interfaces.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.devices">devices</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Determine the names of available network interfaces.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.host_hints">host_hints</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns a two-dimensional table of host hints.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.ipv4_hints">ipv4_hints</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns a two-dimensional table of IPv4 address hints.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.ipv6_hints">ipv6_hints</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns a two-dimensional table of IPv6 address hints.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.mac_hints">mac_hints</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns a two-dimensional table of mac address hints.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.pingtest">pingtest</a> (host)</td>
|
||||
<td class="summary">
|
||||
|
||||
Tests whether the given host responds to ping probes.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.routes">routes</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns the current kernel routing table entries.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#net.routes6">routes6</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Returns the current ipv6 kernel routing table entries.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.arptable"></a><strong>arptable</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns the current arp-table entries as two-dimensional table.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of table containing the current arp entries.
|
||||
The following fields are defined for arp entry objects:
|
||||
{ "IP address", "HW address", "HW type", "Flags", "Mask", "Device" }
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.conntrack"></a><strong>conntrack</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns conntrack information
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table with the currently tracked IP connections
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.deviceinfo"></a><strong>deviceinfo</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Return information about available network interfaces.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing all current interface names and their information
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.devices"></a><strong>devices</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Determine the names of available network interfaces.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing all current interface names
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.host_hints"></a><strong>host_hints</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns a two-dimensional table of host hints.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of table containing known hosts from various sources,
|
||||
indexed by mac address. Each subtable contains at least one
|
||||
of the fields "name", "ipv4" or "ipv6".
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.ipv4_hints"></a><strong>ipv4_hints</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns a two-dimensional table of IPv4 address hints.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of table containing known hosts from various sources.
|
||||
Each entry contains the values in the following order:
|
||||
[ "ip", "name" ]
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.ipv6_hints"></a><strong>ipv6_hints</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns a two-dimensional table of IPv6 address hints.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of table containing known hosts from various sources.
|
||||
Each entry contains the values in the following order:
|
||||
[ "ip", "name" ]
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.mac_hints"></a><strong>mac_hints</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns a two-dimensional table of mac address hints.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of table containing known hosts from various sources.
|
||||
Each entry contains the values in the following order:
|
||||
[ "mac", "name" ]
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.pingtest"></a><strong>pingtest</strong> (host)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Tests whether the given host responds to ping probes.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
host: String containing a hostname or IPv4 address
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Number containing 0 on success and >= 1 on error
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.routes"></a><strong>routes</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns the current kernel routing table entries.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of tables with properties of the corresponding routes.
|
||||
The following fields are defined for route entry tables:
|
||||
{ "dest", "gateway", "metric", "refcount", "usecount", "irtt",
|
||||
"flags", "device" }
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="net.routes6"></a><strong>routes6</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Returns the current ipv6 kernel routing table entries.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table of tables with properties of the corresponding routes.
|
||||
The following fields are defined for route entry tables:
|
||||
{ "source", "dest", "nexthop", "metric", "refcount", "usecount",
|
||||
"flags", "device" }
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
523
api/modules/luci.sys.process.html
Normal file
523
api/modules/luci.sys.process.html
Normal file
|
@ -0,0 +1,523 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys.process</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.sys.process</code></h1>
|
||||
|
||||
<p>
|
||||
|
||||
LuCI system utilities / process related functions.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#process.exec">exec</a> (commend, stdout, stderr, nowait)</td>
|
||||
<td class="summary">
|
||||
|
||||
Execute a process, optionally capturing stdio.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#process.info">info</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Get the current process id.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#process.list">list</a> ()</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieve information about currently running processes.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#process.setgroup">setgroup</a> (gid)</td>
|
||||
<td class="summary">
|
||||
|
||||
Set the gid of a process identified by given pid.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#process.setuser">setuser</a> (uid)</td>
|
||||
<td class="summary">
|
||||
|
||||
Set the uid of a process identified by given pid.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#process.signal">signal</a> (pid, sig)</td>
|
||||
<td class="summary">
|
||||
|
||||
Send a signal to a process identified by given pid.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="process.exec"></a><strong>exec</strong> (commend, stdout, stderr, nowait)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Execute a process, optionally capturing stdio.
|
||||
|
||||
Executes the process specified by the given argv vector, e.g.
|
||||
<code>{ "/bin/sh", "-c", "echo 1" }</code> and waits for it to terminate unless a true
|
||||
value has been passed for the "nowait" parameter.
|
||||
|
||||
When a function value is passed for the stdout or stderr arguments, the passed
|
||||
function is repeatedly called for each chunk read from the corresponding stdio
|
||||
stream. The read data is passed as string containing at most 4096 bytes at a
|
||||
time.
|
||||
|
||||
When a true, non-function value is passed for the stdout or stderr arguments,
|
||||
the data of the corresponding stdio stream is read into an internal string
|
||||
buffer and returned as "stdout" or "stderr" field respectively in the result
|
||||
table.
|
||||
|
||||
When a true value is passed to the nowait parameter, the function does not
|
||||
await process termination but returns as soon as all captured stdio streams
|
||||
have been closed or - if no streams are captured - immediately after launching
|
||||
the process.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
commend: Table containing the argv vector to execute
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stdout: Callback function or boolean to indicate capturing (optional)
|
||||
</li>
|
||||
|
||||
<li>
|
||||
stderr: Callback function or boolean to indicate capturing (optional)
|
||||
</li>
|
||||
|
||||
<li>
|
||||
nowait: Don't wait for process termination when true (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing at least the fields "code" which holds the exit
|
||||
status of the invoked process or "-1" on error and "pid", which
|
||||
contains the process id assigned to the spawned process. When
|
||||
stdout and/or stderr capturing has been requested, it additionally
|
||||
contains "stdout" and "stderr" fields respectively, holding the
|
||||
captured stdio data as string.
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="process.info"></a><strong>info</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Get the current process id.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Number containing the current pid
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="process.list"></a><strong>list</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieve information about currently running processes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing process information
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="process.setgroup"></a><strong>setgroup</strong> (gid)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Set the gid of a process identified by given pid.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
gid: Number containing the Unix group id
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating successful operation
|
||||
|
||||
<li>String containing the error message if failed
|
||||
|
||||
<li>Number containing the error code if failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="process.setuser"></a><strong>setuser</strong> (uid)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Set the uid of a process identified by given pid.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
uid: Number containing the Unix user id
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating successful operation
|
||||
|
||||
<li>String containing the error message if failed
|
||||
|
||||
<li>Number containing the error code if failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="process.signal"></a><strong>signal</strong> (pid, sig)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Send a signal to a process identified by given pid.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
pid: Number containing the process id
|
||||
</li>
|
||||
|
||||
<li>
|
||||
sig: Signal to send (default: 15 [SIGTERM])
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>Boolean indicating successful operation
|
||||
|
||||
<li>Number containing the error code if failed
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
416
api/modules/luci.sys.user.html
Normal file
416
api/modules/luci.sys.user.html
Normal 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.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys.user</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.sys.user</code></h1>
|
||||
|
||||
<p>
|
||||
|
||||
LuCI system utilities / user related functions.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#getuser">getuser</a> (uid)</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieve user information for given uid.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#user.checkpasswd">checkpasswd</a> (username, pass)</td>
|
||||
<td class="summary">
|
||||
|
||||
Test whether given string matches the password of a given system user.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#user.getpasswd">getpasswd</a> (username)</td>
|
||||
<td class="summary">
|
||||
|
||||
Retrieve the current user password hash.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#user.setpasswd">setpasswd</a> (username, password)</td>
|
||||
<td class="summary">
|
||||
|
||||
Change the password of given user.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="getuser"></a><strong>getuser</strong> (uid)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieve user information for given uid.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
uid: Number containing the Unix user id
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing the following fields:
|
||||
{ "uid", "gid", "name", "passwd", "dir", "shell", "gecos" }
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="user.checkpasswd"></a><strong>checkpasswd</strong> (username, pass)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Test whether given string matches the password of a given system user.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
username: String containing the Unix user name
|
||||
</li>
|
||||
|
||||
<li>
|
||||
pass: String containing the password to compare
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Boolean indicating whether the passwords are equal
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="user.getpasswd"></a><strong>getpasswd</strong> (username)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Retrieve the current user password hash.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
username: String containing the username to retrieve the password for
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>String containing the hash or nil if no password is set.
|
||||
|
||||
<li>Password database entry
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="user.setpasswd"></a><strong>setpasswd</strong> (username, password)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Change the password of given user.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
username: String containing the Unix user name
|
||||
</li>
|
||||
|
||||
<li>
|
||||
password: String containing the password to compare
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Number containing 0 on success and >= 1 on error
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
284
api/modules/luci.sys.wifi.html
Normal file
284
api/modules/luci.sys.wifi.html
Normal 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.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.sys.wifi</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>luci.sys.wifi</code></h1>
|
||||
|
||||
<p>
|
||||
|
||||
LuCI system utilities / wifi related functions.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#wifi.getiwinfo">getiwinfo</a> (ifname)</td>
|
||||
<td class="summary">
|
||||
|
||||
Get wireless information for given interface.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="wifi.getiwinfo"></a><strong>getiwinfo</strong> (ifname)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Get wireless information for given interface.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
ifname: String containing the interface name
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
A wrapped iwinfo object instance
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
1772
api/modules/luci.util.html
Normal file
1772
api/modules/luci.util.html
Normal file
File diff suppressed because it is too large
Load diff
321
api/modules/luci.xml.html
Normal file
321
api/modules/luci.xml.html
Normal file
|
@ -0,0 +1,321 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li><strong>luci.xml</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.xml</code></h1>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#pcdata">pcdata</a> (value)</td>
|
||||
<td class="summary">
|
||||
|
||||
Create valid XML PCDATA from given string.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#striptags">striptags</a> (value)</td>
|
||||
<td class="summary">
|
||||
|
||||
Strip HTML tags from given string.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="pcdata"></a><strong>pcdata</strong> (value)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Create valid XML PCDATA from given string.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
value: String value containing the data to escape
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String value containing the escaped data
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="striptags"></a><strong>striptags</strong> (value)</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
Strip HTML tags from given string.
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
value: String containing the HTML text
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
String with HTML tags stripped of
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</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>
|
290
api/modules/nixio.CHANGELOG.html
Normal file
290
api/modules/nixio.CHANGELOG.html
Normal file
|
@ -0,0 +1,290 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.CHANGELOG</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>nixio.CHANGELOG</code></h1>
|
||||
|
||||
<p>
|
||||
Changes and improvements.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Tables</h2>
|
||||
<table class="table_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#0.2">0.2</a></td>
|
||||
<td class="summary">
|
||||
Initial Release.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#0.3">0.3</a></td>
|
||||
<td class="summary">
|
||||
Service Release.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2><a name="tables"></a>Tables</h2>
|
||||
<dl class="table">
|
||||
|
||||
<dt><a name="0.2"></a><strong>0.2</strong></dt>
|
||||
<dd>
|
||||
Initial Release.
|
||||
<ul>
|
||||
<li>Initial Release</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt><a name="0.3"></a><strong>0.3</strong></dt>
|
||||
<dd>
|
||||
Service Release.
|
||||
<ul>
|
||||
<li>Added getifaddrs() function.</li>
|
||||
<li>Added getsockopt(), setsockopt(), getsockname() and getpeername()
|
||||
directly to TLS-socket objects unifying the socket interface.</li>
|
||||
<li>Added support for CyaSSL as cryptographical backend.</li>
|
||||
<li>Added support for x509 certificates in DER format.</li>
|
||||
<li>Added support for splice() in UnifiedIO.copyz().</li>
|
||||
<li>Added interface to inject chunks into UnifiedIO.linesource() buffer.</li>
|
||||
<li>Changed TLS behaviour to explicitly separate servers and clients.</li>
|
||||
<li>Fixed usage of signed datatype breaking Base64 decoding.</li>
|
||||
<li>Fixed namespace clashes for nixio.fs.</li>
|
||||
<li>Fixed splice() support for some exotic C libraries.</li>
|
||||
<li>Reconfigure axTLS cryptographical provider and mark it as obsolete.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
316
api/modules/nixio.CryptoHash.html
Normal file
316
api/modules/nixio.CryptoHash.html
Normal file
|
@ -0,0 +1,316 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.CryptoHash</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>nixio.CryptoHash</code></h1>
|
||||
|
||||
<p>
|
||||
Cryptographical Hash and HMAC object.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#CryptoHash.final">CryptoHash:final</a> ()</td>
|
||||
<td class="summary">
|
||||
Finalize the hash and return the digest.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#CryptoHash.update">CryptoHash:update</a> (chunk)</td>
|
||||
<td class="summary">
|
||||
Add another chunk of data to be hashed.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="CryptoHash.final"></a><strong>CryptoHash:final</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Finalize the hash and return the digest.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
You cannot call update on a hash object that was already finalized
|
||||
you can however call final multiple times to get the digest.
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>hexdigest
|
||||
|
||||
<li>buffer containing binary digest
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="CryptoHash.update"></a><strong>CryptoHash:update</strong> (chunk)</dt>
|
||||
<dd>
|
||||
|
||||
Add another chunk of data to be hashed.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
chunk: Chunk of data
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
CryptoHash object (self)
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
673
api/modules/nixio.File.html
Normal file
673
api/modules/nixio.File.html
Normal file
|
@ -0,0 +1,673 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.File</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>nixio.File</code></h1>
|
||||
|
||||
<p>
|
||||
Large File Object.
|
||||
Large file operations are supported up to 52 bits if the Lua number type is
|
||||
double (default).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.close">File:close</a> ()</td>
|
||||
<td class="summary">
|
||||
Close the file descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.fileno">File:fileno</a> ()</td>
|
||||
<td class="summary">
|
||||
Get the number of the filedescriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.lock">File:lock</a> (command, length)</td>
|
||||
<td class="summary">
|
||||
Apply or test a lock on the file.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.read">File:read</a> (length)</td>
|
||||
<td class="summary">
|
||||
Read from a file descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.seek">File:seek</a> (offset, whence)</td>
|
||||
<td class="summary">
|
||||
Reposition read / write offset of the file descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.setblocking">File:setblocking</a> (blocking)</td>
|
||||
<td class="summary">
|
||||
(POSIX) Set the blocking mode of the file descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.stat">File:stat</a> (field)</td>
|
||||
<td class="summary">
|
||||
Get file status and attributes.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.sync">File:sync</a> (data_only)</td>
|
||||
<td class="summary">
|
||||
Synchronizes the file with the storage device.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.tell">File:tell</a> ()</td>
|
||||
<td class="summary">
|
||||
Return the current read / write offset of the file descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#File.write">File:write</a> (buffer, offset, length)</td>
|
||||
<td class="summary">
|
||||
Write to the file descriptor.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.close"></a><strong>File:close</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Close the file descriptor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.fileno"></a><strong>File:fileno</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Get the number of the filedescriptor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
file descriptor number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.lock"></a><strong>File:lock</strong> (command, length)</dt>
|
||||
<dd>
|
||||
|
||||
Apply or test a lock on the file.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
command: Locking Command ["lock", "tlock", "ulock", "test"]
|
||||
</li>
|
||||
|
||||
<li>
|
||||
length: Amount of Bytes to lock from current offset (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function calls lockf() on POSIX and _locking() on Windows.
|
||||
|
||||
<li>The "lock" command is blocking, "tlock" is non-blocking,
|
||||
"ulock" unlocks and "test" only tests for the lock.
|
||||
|
||||
<li>The "test" command is not available on Windows.
|
||||
|
||||
<li>Locks are by default advisory on POSIX, but mandatory on Windows.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.read"></a><strong>File:read</strong> (length)</dt>
|
||||
<dd>
|
||||
|
||||
Read from a file descriptor.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
length: Amount of data to read (in Bytes).
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li><strong>Warning:</strong> It is not guaranteed that all requested data
|
||||
is read at once especially when dealing with pipes.
|
||||
You have to check the return value - the length of the buffer actually read -
|
||||
or use the safe IO functions in the high-level IO utility module.
|
||||
|
||||
<li>The length of the return buffer is limited by the (compile time)
|
||||
nixio buffersize which is <em>nixio.const.buffersize</em> (8192 by default).
|
||||
Any read request greater than that will be safely truncated to this value.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
buffer containing data successfully read
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.seek"></a><strong>File:seek</strong> (offset, whence)</dt>
|
||||
<dd>
|
||||
|
||||
Reposition read / write offset of the file descriptor.
|
||||
The seek will be done either from the beginning of the file or relative
|
||||
to the current position or relative to the end.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
offset: File Offset
|
||||
</li>
|
||||
|
||||
<li>
|
||||
whence: Starting point [<strong>"set"</strong>, "cur", "end"]
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls lseek().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
new (absolute) offset position
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.setblocking"></a><strong>File:setblocking</strong> (blocking)</dt>
|
||||
<dd>
|
||||
|
||||
(POSIX) Set the blocking mode of the file descriptor.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
blocking: (boolean)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.stat"></a><strong>File:stat</strong> (field)</dt>
|
||||
<dd>
|
||||
|
||||
Get file status and attributes.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
field: Only return a specific field, not the whole table (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls fstat().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Table containing: <ul>
|
||||
<li>atime = Last access timestamp</li>
|
||||
<li>blksize = Blocksize (POSIX only)</li>
|
||||
<li>blocks = Blocks used (POSIX only)</li>
|
||||
<li>ctime = Creation timestamp</li>
|
||||
<li>dev = Device ID</li>
|
||||
<li>gid = Group ID</li>
|
||||
<li>ino = Inode</li>
|
||||
<li>modedec = Mode converted into a decimal number</li>
|
||||
<li>modestr = Mode as string as returned by <code>ls -l</code></li>
|
||||
<li>mtime = Last modification timestamp</li>
|
||||
<li>nlink = Number of links</li>
|
||||
<li>rdev = Device ID (if special file)</li>
|
||||
<li>size = Size in bytes</li>
|
||||
<li>type = ["reg", "dir", "chr", "blk", "fifo", "lnk", "sock"]</li>
|
||||
<li>uid = User ID</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.sync"></a><strong>File:sync</strong> (data_only)</dt>
|
||||
<dd>
|
||||
|
||||
Synchronizes the file with the storage device.
|
||||
Returns when the file is successfully written to the disk.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
data_only: Do not synchronize the metadata. (optional, boolean)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function calls fsync() when data_only equals false
|
||||
otherwise fdatasync(), on Windows _commit() is used instead.
|
||||
|
||||
<li>fdatasync() is only supported by Linux and Solaris. For other systems
|
||||
the <em>data_only</em> parameter is ignored and fsync() is always called.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.tell"></a><strong>File:tell</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Return the current read / write offset of the file descriptor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls lseek() with offset 0 from the current position.
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
offset position
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="File.write"></a><strong>File:write</strong> (buffer, offset, length)</dt>
|
||||
<dd>
|
||||
|
||||
Write to the file descriptor.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Buffer holding the data to be written.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
offset: Offset to start reading the buffer from. (optional)
|
||||
</li>
|
||||
|
||||
<li>
|
||||
length: Length of chunk to read from the buffer. (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li><strong>Warning:</strong> It is not guaranteed that all data
|
||||
in the buffer is written at once especially when dealing with pipes.
|
||||
You have to check the return value - the number of bytes actually written -
|
||||
or use the safe IO functions in the high-level IO utility module.
|
||||
|
||||
<li>Unlike standard Lua indexing the lowest offset and default is 0.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number of bytes written
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
374
api/modules/nixio.README.html
Normal file
374
api/modules/nixio.README.html
Normal file
|
@ -0,0 +1,374 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.README</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>nixio.README</code></h1>
|
||||
|
||||
<p>
|
||||
General Information.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Tables</h2>
|
||||
<table class="table_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Errorhandling">Errorhandling</a></td>
|
||||
<td class="summary">
|
||||
General error handling information.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Functions">Functions</a></td>
|
||||
<td class="summary">
|
||||
Function conventions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#Platforms">Platforms</a></td>
|
||||
<td class="summary">
|
||||
Platform information.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLS-Crypto">TLS-Crypto</a></td>
|
||||
<td class="summary">
|
||||
Cryptography and TLS libraries.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2><a name="tables"></a>Tables</h2>
|
||||
<dl class="table">
|
||||
|
||||
<dt><a name="Errorhandling"></a><strong>Errorhandling</strong></dt>
|
||||
<dd>
|
||||
General error handling information.
|
||||
<ul>
|
||||
<li> Most of the functions available in this library may fail. If any error
|
||||
occurs the function returns <strong>nil or false</strong>, an error code
|
||||
(usually errno) and an additional error message text (if avaialable).</li>
|
||||
<li>At the moment false is only returned when a non-blocking I/O function
|
||||
fails with EAGAIN, EWOULDBLOCK or WSAEWOULDBLOCK for any others nil is
|
||||
returned as first parameter. Therefore you can use false to write portable
|
||||
non-blocking I/O applications.</li>
|
||||
<li>Note that the function documentation does only mention the return values
|
||||
in case of a successful operation.</li>
|
||||
<li>You can find a table of common error numbers and other useful constants
|
||||
like signal numbers in <strong>nixio.const</strong> e.g. nixio.const.EINVAL,
|
||||
nixio.const.SIGTERM, etc. For portability there is a second error constant
|
||||
table <strong>nixio.const_sock</strong> for socket error codes. This might
|
||||
be important if you are dealing with Windows applications, on POSIX however
|
||||
const_sock is just an alias for const.</li>
|
||||
<li>With some exceptions - which are explicitly stated in the function
|
||||
documentation - all blocking functions are signal-protected and will not fail
|
||||
with EINTR.</li>
|
||||
<li>On POSIX the SIGPIPE signal will be set to ignore upon initialization.
|
||||
You should restore the default behaviour or set a custom signal handler
|
||||
in your program after loading nixio if you need this behaviour.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt><a name="Functions"></a><strong>Functions</strong></dt>
|
||||
<dd>
|
||||
Function conventions.
|
||||
<br />In general all functions are namend and behave like their POSIX API
|
||||
counterparts - where applicable - applying the following rules:
|
||||
<ul>
|
||||
<li>Functions should be named like the underlying POSIX API function omitting
|
||||
prefixes or suffixes - especially when placed in an object-context (
|
||||
lockf -> File:lock, fsync -> File:sync, dup2 -> dup, ...)</li>
|
||||
<li>If you are unclear about the behaviour of a function you should consult
|
||||
your OS API documentation (e.g. the manpages).</li>
|
||||
<li>If the name is significantly different from the POSIX-function, the
|
||||
underlying function(s) are stated in the documentation.</li>
|
||||
<li>Parameters should reflect those of the C-API, buffer length arguments and
|
||||
by-reference parameters should be omitted for practical purposes.</li>
|
||||
<li>If a C function accepts a bitfield as parameter, it should be translated
|
||||
into lower case string flags representing the flags if the bitfield is the
|
||||
last parameter and also omitting prefixes or suffixes. (e.g. waitpid
|
||||
(pid, &s, WNOHANG | WUNTRACED) -> waitpid(pid, "nohang", "untraced"),
|
||||
getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) ->
|
||||
Socket:getopt("socket", "reuseaddr"), etc.) </li>
|
||||
<li>If it is not applicable to provide a string representation of the
|
||||
bitfield a bitfield generator helper is provided. It is named FUNCTION_flags.
|
||||
(open("/tmp/test", O_RDONLY | O_NONBLOCK) -> open("/tmp/test", open_flags(
|
||||
"rdonly", "nonblock")))</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt><a name="Platforms"></a><strong>Platforms</strong></dt>
|
||||
<dd>
|
||||
Platform information.
|
||||
<ul>
|
||||
<li>The minimum platform requirements are a decent POSIX 2001 support.
|
||||
Builds are more or less tested on Linux, Solaris and FreeBSD. Builds for
|
||||
Windows XP SP1 and later can be compiled with MinGW either from Windows
|
||||
itself or using the MinGW cross-compiler. Earlier versions of Windows are not
|
||||
supported.</li>
|
||||
<li>In general all functions which don't have any remarks
|
||||
in their documentation are available on all platforms.</li>
|
||||
<li>Functions with a (POSIX), (Linux) or similar prefix are only available
|
||||
on these specific platforms. Same appplies to parameters of functions
|
||||
with a similar suffix.</li>
|
||||
<li>Some functions might have limitations on some platforms. This should
|
||||
be stated in the documentation. Please also consult your OS API
|
||||
documentation.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt><a name="TLS-Crypto"></a><strong>TLS-Crypto</strong></dt>
|
||||
<dd>
|
||||
Cryptography and TLS libraries.
|
||||
<ul>
|
||||
<li>Currently 3 underlying cryptography libraries are supported: openssl,
|
||||
cyassl and axTLS. The name of the library in use is written to
|
||||
<strong>nixio.tls_provider</strong></li>
|
||||
<li>You should whenever possible use openssl or cyassl as axTLS has only
|
||||
limited support. It does not provide support for non-blocking sockets and
|
||||
is probably less audited than the other ones.</li>
|
||||
<li>As the supported Windows versions are not suitable for embedded devices
|
||||
axTLS is at the moment not supported on Windows.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
1033
api/modules/nixio.Socket.html
Normal file
1033
api/modules/nixio.Socket.html
Normal file
File diff suppressed because it is too large
Load diff
479
api/modules/nixio.TLSContext.html
Normal file
479
api/modules/nixio.TLSContext.html
Normal file
|
@ -0,0 +1,479 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.TLSContext</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>nixio.TLSContext</code></h1>
|
||||
|
||||
<p>
|
||||
Transport Layer Security Context Object.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSContext.create">TLSContext:create</a> (socket)</td>
|
||||
<td class="summary">
|
||||
Create a TLS Socket from a socket descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSContext.set_cert">TLSContext:set_cert</a> (path)</td>
|
||||
<td class="summary">
|
||||
Assign a PEM certificate to this context.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSContext.set_ciphers">TLSContext:set_ciphers</a> (cipherlist)</td>
|
||||
<td class="summary">
|
||||
Set the available ciphers for this context.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSContext.set_key">TLSContext:set_key</a> (path)</td>
|
||||
<td class="summary">
|
||||
Assign a PEM private key to this context.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSContext.set_verify">TLSContext:set_verify</a> (flag1, ...)</td>
|
||||
<td class="summary">
|
||||
Set the verification flags of this context.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSContext.set_verify_depth">TLSContext:set_verify_depth</a> (depth)</td>
|
||||
<td class="summary">
|
||||
Set the verification depth of this context.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSContext.create"></a><strong>TLSContext:create</strong> (socket)</dt>
|
||||
<dd>
|
||||
|
||||
Create a TLS Socket from a socket descriptor.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
socket: Socket Object
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
TLSSocket Object
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSContext.set_cert"></a><strong>TLSContext:set_cert</strong> (path)</dt>
|
||||
<dd>
|
||||
|
||||
Assign a PEM certificate to this context.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
path: Certificate File path
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls SSL_CTX_use_certificate_chain_file().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSContext.set_ciphers"></a><strong>TLSContext:set_ciphers</strong> (cipherlist)</dt>
|
||||
<dd>
|
||||
|
||||
Set the available ciphers for this context.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
cipherlist: String containing a list of ciphers
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls SSL_CTX_set_cipher_list().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSContext.set_key"></a><strong>TLSContext:set_key</strong> (path)</dt>
|
||||
<dd>
|
||||
|
||||
Assign a PEM private key to this context.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
path: Private Key File path
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls SSL_CTX_use_PrivateKey_file().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSContext.set_verify"></a><strong>TLSContext:set_verify</strong> (flag1, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Set the verification flags of this context.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
flag1: First Flag ["none", "peer", "verify_fail_if_no_peer_cert",
|
||||
"client_once"]
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Flags [-"-]
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls SSL_CTX_set_verify().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSContext.set_verify_depth"></a><strong>TLSContext:set_verify_depth</strong> (depth)</dt>
|
||||
<dd>
|
||||
|
||||
Set the verification depth of this context.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
depth: Depth
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls SSL_CTX_set_verify_depth().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
575
api/modules/nixio.TLSSocket.html
Normal file
575
api/modules/nixio.TLSSocket.html
Normal file
|
@ -0,0 +1,575 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.TLSSocket</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>nixio.TLSSocket</code></h1>
|
||||
|
||||
<p>
|
||||
TLS Socket Object.
|
||||
TLS Sockets contain the underlying socket and context in the fields
|
||||
"socket" and "context".</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.accept">TLSSocket:accept</a> ()</td>
|
||||
<td class="summary">
|
||||
Wait for a TLS handshake from a client.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.connect">TLSSocket:connect</a> ()</td>
|
||||
<td class="summary">
|
||||
Initiate the TLS handshake as client with the server.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.read ">TLSSocket:read </a> (length)</td>
|
||||
<td class="summary">
|
||||
Receive a message on the socket (This is an alias for recv).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.recv">TLSSocket:recv</a> (length)</td>
|
||||
<td class="summary">
|
||||
Receive a message on the socket.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.send">TLSSocket:send</a> (buffer, offset, length)</td>
|
||||
<td class="summary">
|
||||
Send a message to the socket.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.shutdown">TLSSocket:shutdown</a> ()</td>
|
||||
<td class="summary">
|
||||
Shut down the TLS connection.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#TLSSocket.write">TLSSocket:write</a> (buffer, offset, length)</td>
|
||||
<td class="summary">
|
||||
Send a message on the socket (This is an alias for send).</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.accept"></a><strong>TLSSocket:accept</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Wait for a TLS handshake from a client.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function calls SSL_accept().
|
||||
|
||||
<li>You have to call either connect or accept before transmitting data.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#TLSSocket.connect">
|
||||
TLSSocket:connect
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.connect"></a><strong>TLSSocket:connect</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Initiate the TLS handshake as client with the server.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function calls SSL_connect().
|
||||
|
||||
<li>You have to call either connect or accept before transmitting data.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#TLSSocket.accept">
|
||||
TLSSocket:accept
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.read "></a><strong>TLSSocket:read </strong> (length)</dt>
|
||||
<dd>
|
||||
|
||||
Receive a message on the socket (This is an alias for recv).
|
||||
See the recv description for more details.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
length: Amount of data to read (in Bytes).
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
buffer containing data successfully read
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#TLSSocket.recv">
|
||||
TLSSocket:recv
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.recv"></a><strong>TLSSocket:recv</strong> (length)</dt>
|
||||
<dd>
|
||||
|
||||
Receive a message on the socket.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
length: Amount of data to read (in Bytes).
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function calls SSL_read().
|
||||
|
||||
<li><strong>Warning:</strong> It is not guaranteed that all requested data
|
||||
is read at once.
|
||||
You have to check the return value - the length of the buffer actually read -
|
||||
or use the safe IO functions in the high-level IO utility module.
|
||||
|
||||
<li>The length of the return buffer is limited by the (compile time)
|
||||
nixio buffersize which is <em>nixio.const.buffersize</em> (8192 by default).
|
||||
Any read request greater than that will be safely truncated to this value.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
buffer containing data successfully read
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.send"></a><strong>TLSSocket:send</strong> (buffer, offset, length)</dt>
|
||||
<dd>
|
||||
|
||||
Send a message to the socket.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Buffer holding the data to be written.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
offset: Offset to start reading the buffer from. (optional)
|
||||
</li>
|
||||
|
||||
<li>
|
||||
length: Length of chunk to read from the buffer. (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function calls SSL_write().
|
||||
|
||||
<li><strong>Warning:</strong> It is not guaranteed that all data
|
||||
in the buffer is written at once.
|
||||
You have to check the return value - the number of bytes actually written -
|
||||
or use the safe IO functions in the high-level IO utility module.
|
||||
|
||||
<li>Unlike standard Lua indexing the lowest offset and default is 0.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number of bytes written
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.shutdown"></a><strong>TLSSocket:shutdown</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Shut down the TLS connection.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
This function calls SSL_shutdown().
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="TLSSocket.write"></a><strong>TLSSocket:write</strong> (buffer, offset, length)</dt>
|
||||
<dd>
|
||||
|
||||
Send a message on the socket (This is an alias for send).
|
||||
See the send description for a detailed description.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Buffer holding the data to be written.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
offset: Offset to start reading the buffer from. (optional)
|
||||
</li>
|
||||
|
||||
<li>
|
||||
length: Length of chunk to read from the buffer. (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number of bytes written
|
||||
|
||||
|
||||
|
||||
<h3>See also:</h3>
|
||||
<ul>
|
||||
|
||||
<li><a href="#TLSSocket.send">
|
||||
TLSSocket:send
|
||||
</a>
|
||||
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
767
api/modules/nixio.UnifiedIO.html
Normal file
767
api/modules/nixio.UnifiedIO.html
Normal file
|
@ -0,0 +1,767 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.UnifiedIO</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Object Instance <code>nixio.UnifiedIO</code></h1>
|
||||
|
||||
<p>
|
||||
Unified high-level I/O utility API for Files, Sockets and TLS-Sockets.
|
||||
These functions are added to the object function tables by doing <strong>
|
||||
require "nixio.util"</strong>, can be used on all nixio IO Descriptors and
|
||||
are based on the shared low-level read() and write() functions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.blocksource">UnifiedIO:blocksource</a> (blocksize, limit)</td>
|
||||
<td class="summary">
|
||||
Create a block-based iterator.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.close">UnifiedIO:close</a> ()</td>
|
||||
<td class="summary">
|
||||
Close the descriptor.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.copy">UnifiedIO:copy</a> (fdout, size)</td>
|
||||
<td class="summary">
|
||||
Copy data from the current descriptor to another one.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.copyz">UnifiedIO:copyz</a> (fdout, size)</td>
|
||||
<td class="summary">
|
||||
Copy data from the current descriptor to another one using kernel-space
|
||||
copying if possible.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.is_file">UnifiedIO:is_file</a> ()</td>
|
||||
<td class="summary">
|
||||
Test whether the I/O-Descriptor is a file.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.is_socket">UnifiedIO:is_socket</a> ()</td>
|
||||
<td class="summary">
|
||||
Test whether the I/O-Descriptor is a socket.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.is_tls_socket">UnifiedIO:is_tls_socket</a> ()</td>
|
||||
<td class="summary">
|
||||
Test whether the I/O-Descriptor is a TLS socket.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.linesource">UnifiedIO:linesource</a> (limit)</td>
|
||||
<td class="summary">
|
||||
Create a line-based iterator.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.readall">UnifiedIO:readall</a> (length)</td>
|
||||
<td class="summary">
|
||||
Read a block of data and wait until all data is available.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.sink">UnifiedIO:sink</a> (close_when_done)</td>
|
||||
<td class="summary">
|
||||
Create a sink.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#UnifiedIO.writeall">UnifiedIO:writeall</a> (block)</td>
|
||||
<td class="summary">
|
||||
Write a block of data and wait until all data is written.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.blocksource"></a><strong>UnifiedIO:blocksource</strong> (blocksize, limit)</dt>
|
||||
<dd>
|
||||
|
||||
Create a block-based iterator.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
blocksize: Advisory blocksize (optional)
|
||||
</li>
|
||||
|
||||
<li>
|
||||
limit: Amount of data to consume (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the low-level read function of the descriptor.
|
||||
|
||||
<li>The blocksize given is only advisory and to be seen as an upper limit,
|
||||
if an underlying read returns less bytes the chunk is nevertheless returned.
|
||||
|
||||
<li>If the limit parameter is omitted, the iterator returns data
|
||||
until an end-of-file, end-of-stream, connection shutdown or similar happens.
|
||||
|
||||
<li>The iterator will not buffer so it is safe to mix with calls to read.
|
||||
|
||||
<li>If the descriptor is non-blocking the iterator may fail with EAGAIN.
|
||||
|
||||
<li>The iterator can be used as an LTN12 source.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Block-based Iterator
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.close"></a><strong>UnifiedIO:close</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Close the descriptor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage:</h3>
|
||||
If the descriptor is a TLS-socket the underlying descriptor is
|
||||
closed without touching the TLS connection.
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.copy"></a><strong>UnifiedIO:copy</strong> (fdout, size)</dt>
|
||||
<dd>
|
||||
|
||||
Copy data from the current descriptor to another one.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
fdout: Target Descriptor
|
||||
</li>
|
||||
|
||||
<li>
|
||||
size: Bytes to copy (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the blocksource function of the source descriptor
|
||||
and the sink function of the target descriptor.
|
||||
|
||||
<li>If the limit parameter is omitted, data is copied
|
||||
until an end-of-file, end-of-stream, connection shutdown or similar happens.
|
||||
|
||||
<li>If the descriptor is non-blocking the function may fail with EAGAIN.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>bytes that were successfully written if no error occurred
|
||||
|
||||
<li>- reserved for error code -
|
||||
|
||||
<li>- reserved for error message -
|
||||
|
||||
<li>bytes that were successfully written even if an error occurred
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.copyz"></a><strong>UnifiedIO:copyz</strong> (fdout, size)</dt>
|
||||
<dd>
|
||||
|
||||
Copy data from the current descriptor to another one using kernel-space
|
||||
copying if possible.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
fdout: Target Descriptor
|
||||
</li>
|
||||
|
||||
<li>
|
||||
size: Bytes to copy (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the sendfile() syscall to copy the data or the
|
||||
blocksource function of the source descriptor and the sink function
|
||||
of the target descriptor as a fallback mechanism.
|
||||
|
||||
<li>If the limit parameter is omitted, data is copied
|
||||
until an end-of-file, end-of-stream, connection shutdown or similar happens.
|
||||
|
||||
<li>If the descriptor is non-blocking the function may fail with EAGAIN.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>bytes that were successfully written if no error occurred
|
||||
|
||||
<li>- reserved for error code -
|
||||
|
||||
<li>- reserved for error message -
|
||||
|
||||
<li>bytes that were successfully written even if an error occurred
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.is_file"></a><strong>UnifiedIO:is_file</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Test whether the I/O-Descriptor is a file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
boolean
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.is_socket"></a><strong>UnifiedIO:is_socket</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Test whether the I/O-Descriptor is a socket.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
boolean
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.is_tls_socket"></a><strong>UnifiedIO:is_tls_socket</strong> ()</dt>
|
||||
<dd>
|
||||
|
||||
Test whether the I/O-Descriptor is a TLS socket.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
boolean
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.linesource"></a><strong>UnifiedIO:linesource</strong> (limit)</dt>
|
||||
<dd>
|
||||
|
||||
Create a line-based iterator.
|
||||
Lines may end with either \n or \r\n, these control chars are not included
|
||||
in the return value.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
limit: Line limit
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the low-level read function of the descriptor.
|
||||
|
||||
<li><strong>Note:</strong> This function uses an internal buffer to read
|
||||
ahead. Do NOT mix calls to read(all) and the returned iterator. If you want
|
||||
to stop reading line-based and want to use the read(all) functions instead
|
||||
you can pass "true" to the iterator which will flush the buffer
|
||||
and return the bufferd data.
|
||||
|
||||
<li>If the limit parameter is omitted, this function uses the nixio
|
||||
buffersize (8192B by default).
|
||||
|
||||
<li>If the descriptor is non-blocking the iterator may fail with EAGAIN.
|
||||
|
||||
<li>The iterator can be used as an LTN12 source.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Line-based Iterator
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.readall"></a><strong>UnifiedIO:readall</strong> (length)</dt>
|
||||
<dd>
|
||||
|
||||
Read a block of data and wait until all data is available.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
length: Bytes to read (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the low-level read function of the descriptor.
|
||||
|
||||
<li>If the length parameter is omitted, this function returns all data
|
||||
that can be read before an end-of-file, end-of-stream, connection shutdown
|
||||
or similar happens.
|
||||
|
||||
<li>If the descriptor is non-blocking this function may fail with EAGAIN.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>data that was successfully read if no error occurred
|
||||
|
||||
<li>- reserved for error code -
|
||||
|
||||
<li>- reserved for error message -
|
||||
|
||||
<li>data that was successfully read even if an error occurred
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.sink"></a><strong>UnifiedIO:sink</strong> (close_when_done)</dt>
|
||||
<dd>
|
||||
|
||||
Create a sink.
|
||||
This sink will simply write all data that it receives and optionally
|
||||
close the descriptor afterwards.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
close_when_done: (optional, boolean)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the writeall function of the descriptor.
|
||||
|
||||
<li>If the descriptor is non-blocking the sink may fail with EAGAIN.
|
||||
|
||||
<li>The iterator can be used as an LTN12 sink.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
Sink
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="UnifiedIO.writeall"></a><strong>UnifiedIO:writeall</strong> (block)</dt>
|
||||
<dd>
|
||||
|
||||
Write a block of data and wait until all data is written.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
block: Bytes to write
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Usage</h3>
|
||||
<ul>
|
||||
|
||||
<li>This function uses the low-level write function of the descriptor.
|
||||
|
||||
<li>If the descriptor is non-blocking this function may fail with EAGAIN.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h3>Return values:</h3>
|
||||
<ol>
|
||||
|
||||
<li>bytes that were successfully written if no error occurred
|
||||
|
||||
<li>- reserved for error code -
|
||||
|
||||
<li>- reserved for error message -
|
||||
|
||||
<li>bytes that were successfully written even if an error occurred
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
427
api/modules/nixio.bin.html
Normal file
427
api/modules/nixio.bin.html
Normal file
|
@ -0,0 +1,427 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.bin</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>nixio.bin</code></h1>
|
||||
|
||||
<p>
|
||||
Binary operations and conversion.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#b64decode">b64decode</a> (buffer)</td>
|
||||
<td class="summary">
|
||||
Base64 decode a given buffer.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#b64encode">b64encode</a> (buffer)</td>
|
||||
<td class="summary">
|
||||
Base64 encode a given buffer.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#crc32">crc32</a> (buffer, initial)</td>
|
||||
<td class="summary">
|
||||
Calculate the CRC32 value of a buffer.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#hexlify">hexlify</a> (buffer)</td>
|
||||
<td class="summary">
|
||||
Return a hexadecimal ASCII represantation of the content of a buffer.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#unhexlify">unhexlify</a> (hexvalue)</td>
|
||||
<td class="summary">
|
||||
Return a binary buffer from a hexadecimal ASCII representation.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="b64decode"></a><strong>b64decode</strong> (buffer)</dt>
|
||||
<dd>
|
||||
|
||||
Base64 decode a given buffer.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Base64 Encoded data
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
binary data
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="b64encode"></a><strong>b64encode</strong> (buffer)</dt>
|
||||
<dd>
|
||||
|
||||
Base64 encode a given buffer.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Buffer
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
base64 encoded buffer
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="crc32"></a><strong>crc32</strong> (buffer, initial)</dt>
|
||||
<dd>
|
||||
|
||||
Calculate the CRC32 value of a buffer.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Buffer
|
||||
</li>
|
||||
|
||||
<li>
|
||||
initial: Initial CRC32 value (optional)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
crc32 value
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="hexlify"></a><strong>hexlify</strong> (buffer)</dt>
|
||||
<dd>
|
||||
|
||||
Return a hexadecimal ASCII represantation of the content of a buffer.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
buffer: Buffer
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
representation using characters [0-9a-f]
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="unhexlify"></a><strong>unhexlify</strong> (hexvalue)</dt>
|
||||
<dd>
|
||||
|
||||
Return a binary buffer from a hexadecimal ASCII representation.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
hexvalue: representation using characters [0-9a-f]
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
binary data
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
744
api/modules/nixio.bit.html
Normal file
744
api/modules/nixio.bit.html
Normal file
|
@ -0,0 +1,744 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.bit</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.crypto.html">nixio.crypto</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>nixio.bit</code></h1>
|
||||
|
||||
<p>
|
||||
Bitfield operators and mainpulation functions.
|
||||
Can be used as a drop-in replacement for bitlib.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#arshift">arshift</a> (oper, shift)</td>
|
||||
<td class="summary">
|
||||
Arithmetically right shift a number.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#band">band</a> (oper1, oper2, ...)</td>
|
||||
<td class="summary">
|
||||
Bitwise AND several numbers.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#bnot">bnot</a> (oper)</td>
|
||||
<td class="summary">
|
||||
Invert given number.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#bor">bor</a> (oper1, oper2, ...)</td>
|
||||
<td class="summary">
|
||||
Bitwise OR several numbers.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#bxor">bxor</a> (oper1, oper2, ...)</td>
|
||||
<td class="summary">
|
||||
Bitwise XOR several numbers.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#cast">cast</a> (oper)</td>
|
||||
<td class="summary">
|
||||
Cast a number to the bit-operating range.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#check">check</a> (bitfield, flag1, ...)</td>
|
||||
<td class="summary">
|
||||
Checks whether given flags are set in a bitfield.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#div">div</a> (oper1, oper2, ...)</td>
|
||||
<td class="summary">
|
||||
Integer division of 2 or more numbers.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#lshift">lshift</a> (oper, shift)</td>
|
||||
<td class="summary">
|
||||
Left shift a number.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#rshift">rshift</a> (oper, shift)</td>
|
||||
<td class="summary">
|
||||
Right shift a number.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#set">set</a> (bitfield, flag1, ...)</td>
|
||||
<td class="summary">
|
||||
Sets one or more flags of a bitfield.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#unset">unset</a> (bitfield, flag1, ...)</td>
|
||||
<td class="summary">
|
||||
Unsets one or more flags of a bitfield.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="arshift"></a><strong>arshift</strong> (oper, shift)</dt>
|
||||
<dd>
|
||||
|
||||
Arithmetically right shift a number.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper: number
|
||||
</li>
|
||||
|
||||
<li>
|
||||
shift: bits to shift
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="band"></a><strong>band</strong> (oper1, oper2, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Bitwise AND several numbers.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper1: First Operand
|
||||
</li>
|
||||
|
||||
<li>
|
||||
oper2: Second Operand
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Operands
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="bnot"></a><strong>bnot</strong> (oper)</dt>
|
||||
<dd>
|
||||
|
||||
Invert given number.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper: Operand
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="bor"></a><strong>bor</strong> (oper1, oper2, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Bitwise OR several numbers.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper1: First Operand
|
||||
</li>
|
||||
|
||||
<li>
|
||||
oper2: Second Operand
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Operands
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="bxor"></a><strong>bxor</strong> (oper1, oper2, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Bitwise XOR several numbers.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper1: First Operand
|
||||
</li>
|
||||
|
||||
<li>
|
||||
oper2: Second Operand
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Operands
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="cast"></a><strong>cast</strong> (oper)</dt>
|
||||
<dd>
|
||||
|
||||
Cast a number to the bit-operating range.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper: number
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="check"></a><strong>check</strong> (bitfield, flag1, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Checks whether given flags are set in a bitfield.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
bitfield: Bitfield
|
||||
</li>
|
||||
|
||||
<li>
|
||||
flag1: First Flag
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Flags
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
true when all flags are set, otherwise false
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="div"></a><strong>div</strong> (oper1, oper2, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Integer division of 2 or more numbers.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper1: Operand 1
|
||||
</li>
|
||||
|
||||
<li>
|
||||
oper2: Operand 2
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Operands
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="lshift"></a><strong>lshift</strong> (oper, shift)</dt>
|
||||
<dd>
|
||||
|
||||
Left shift a number.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper: number
|
||||
</li>
|
||||
|
||||
<li>
|
||||
shift: bits to shift
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="rshift"></a><strong>rshift</strong> (oper, shift)</dt>
|
||||
<dd>
|
||||
|
||||
Right shift a number.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
oper: number
|
||||
</li>
|
||||
|
||||
<li>
|
||||
shift: bits to shift
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
number
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="set"></a><strong>set</strong> (bitfield, flag1, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Sets one or more flags of a bitfield.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
bitfield: Bitfield
|
||||
</li>
|
||||
|
||||
<li>
|
||||
flag1: First Flag
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Flags
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
altered bitfield
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="unset"></a><strong>unset</strong> (bitfield, flag1, ...)</dt>
|
||||
<dd>
|
||||
|
||||
Unsets one or more flags of a bitfield.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
bitfield: Bitfield
|
||||
</li>
|
||||
|
||||
<li>
|
||||
flag1: First Flag
|
||||
</li>
|
||||
|
||||
<li>
|
||||
...: More Flags
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
altered bitfield
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
319
api/modules/nixio.crypto.html
Normal file
319
api/modules/nixio.crypto.html
Normal file
|
@ -0,0 +1,319 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference</title>
|
||||
<link rel="stylesheet" href="../luadoc.css" type="text/css" />
|
||||
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div> <!-- id="product" -->
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="navigation">
|
||||
|
||||
|
||||
<h1>LuaDoc</h1>
|
||||
<ul>
|
||||
|
||||
<li><a href="../index.html">Index</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Module list -->
|
||||
|
||||
<h1>Modules</h1>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.html">luci.http</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.date.html">luci.http.date</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.http.mime.html">luci.http.mime</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.i18n.html">luci.i18n</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.html">luci.ip</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.json.html">luci.json</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.html">luci.jsonc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.model.uci.html">luci.model.uci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.html">luci.rpcc</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.html">luci.sys</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.init.html">luci.sys.init</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.net.html">luci.sys.net</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.process.html">luci.sys.process</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.user.html">luci.sys.user</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.util.html">luci.util</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/luci.xml.html">luci.xml</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.html">nixio</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.File.html">nixio.File</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.README.html">nixio.README</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.Socket.html">nixio.Socket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bin.html">nixio.bin</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.bit.html">nixio.bit</a>
|
||||
</li>
|
||||
|
||||
<li><strong>nixio.crypto</strong></li>
|
||||
|
||||
<li>
|
||||
<a href="../modules/nixio.fs.html">nixio.fs</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!-- File list -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- id="navigation" -->
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h1>Class <code>nixio.crypto</code></h1>
|
||||
|
||||
<p>
|
||||
Cryptographical library.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Functions</h2>
|
||||
<table class="function_list">
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#nixio.crypto.hash">hash</a> (algo)</td>
|
||||
<td class="summary">
|
||||
Create a hash object.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="name" nowrap><a href="#nixio.crypto.hmac">hmac</a> (algo, key)</td>
|
||||
<td class="summary">
|
||||
Create a HMAC object.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<h2><a name="functions"></a>Functions</h2>
|
||||
<dl class="function">
|
||||
|
||||
|
||||
|
||||
<dt><a name="nixio.crypto.hash"></a><strong>hash</strong> (algo)</dt>
|
||||
<dd>
|
||||
|
||||
Create a hash object.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
algo: Algorithm ["sha1", "md5"]
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
CryptoHash Object
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<dt><a name="nixio.crypto.hmac"></a><strong>hmac</strong> (algo, key)</dt>
|
||||
<dd>
|
||||
|
||||
Create a HMAC object.
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
algo: Algorithm ["sha1", "md5"]
|
||||
</li>
|
||||
|
||||
<li>
|
||||
key: HMAC-Key
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Return value:</h3>
|
||||
CryptoHash Object
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- id="content" -->
|
||||
|
||||
</div> <!-- id="main" -->
|
||||
|
||||
<div id="about">
|
||||
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
||||
</div> <!-- id="about" -->
|
||||
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
</html>
|
1562
api/modules/nixio.fs.html
Normal file
1562
api/modules/nixio.fs.html
Normal file
File diff suppressed because it is too large
Load diff
2405
api/modules/nixio.html
Normal file
2405
api/modules/nixio.html
Normal file
File diff suppressed because it is too large
Load diff
19
i18n.md
Normal file
19
i18n.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# General
|
||||
Translations are saved in the folder po/ for each module and application. You find the reference in po/templates/<package>.pot. The actual translation files can be found at po/[lang]/[package].po .
|
||||
|
||||
In order to use the commands below you need to have the _gettext'' utilities (''msgcat'', ''msgfmt'', ''msgmerge_) installed on your system.
|
||||
|
||||
# Rebuild po files
|
||||
If you want to rebuild the translations after you made changes to a package this is an easy way:
|
||||
|
||||
./build/i18n-scan.pl applications/[application] > applications/[application]/po/templates/[application_basename].pot
|
||||
./build/i18n-update.pl applications/[application]/po
|
||||
|
||||
Example:
|
||||
./build/i18n-scan.pl applications/luci-app-firewall > applications/luci-app-firewall/po/templates/firewall.pot
|
||||
./build/i18n-update.pl applications/luci-app-firewall/po
|
||||
(note that the directory argument can be omitted for i18n-update.pl to update all apps)
|
||||
|
||||
*Note:* Some packages share translation files, in this case you need to scan through all their folders. The first command from above should then be:
|
||||
|
||||
./build/i18n-scan.pl applications/[package-1] applications/[package-2] applications/[package-n] > [location of shared template]/[application].pot
|
4710
jsapi/LuCI.baseclass.html
Normal file
4710
jsapi/LuCI.baseclass.html
Normal file
File diff suppressed because it is too large
Load diff
6268
jsapi/LuCI.dom.html
Normal file
6268
jsapi/LuCI.dom.html
Normal file
File diff suppressed because it is too large
Load diff
4257
jsapi/LuCI.form.AbstractElement.html
Normal file
4257
jsapi/LuCI.form.AbstractElement.html
Normal file
File diff suppressed because it is too large
Load diff
6156
jsapi/LuCI.form.AbstractSection.html
Normal file
6156
jsapi/LuCI.form.AbstractSection.html
Normal file
File diff suppressed because it is too large
Load diff
7015
jsapi/LuCI.form.AbstractValue.html
Normal file
7015
jsapi/LuCI.form.AbstractValue.html
Normal file
File diff suppressed because it is too large
Load diff
7336
jsapi/LuCI.form.ButtonValue.html
Normal file
7336
jsapi/LuCI.form.ButtonValue.html
Normal file
File diff suppressed because it is too large
Load diff
7322
jsapi/LuCI.form.DummyValue.html
Normal file
7322
jsapi/LuCI.form.DummyValue.html
Normal file
File diff suppressed because it is too large
Load diff
7173
jsapi/LuCI.form.DynamicList.html
Normal file
7173
jsapi/LuCI.form.DynamicList.html
Normal file
File diff suppressed because it is too large
Load diff
7384
jsapi/LuCI.form.FileUpload.html
Normal file
7384
jsapi/LuCI.form.FileUpload.html
Normal file
File diff suppressed because it is too large
Load diff
7262
jsapi/LuCI.form.FlagValue.html
Normal file
7262
jsapi/LuCI.form.FlagValue.html
Normal file
File diff suppressed because it is too large
Load diff
7018
jsapi/LuCI.form.GridSection.html
Normal file
7018
jsapi/LuCI.form.GridSection.html
Normal file
File diff suppressed because it is too large
Load diff
7177
jsapi/LuCI.form.HiddenValue.html
Normal file
7177
jsapi/LuCI.form.HiddenValue.html
Normal file
File diff suppressed because it is too large
Load diff
5836
jsapi/LuCI.form.JSONMap.html
Normal file
5836
jsapi/LuCI.form.JSONMap.html
Normal file
File diff suppressed because it is too large
Load diff
7322
jsapi/LuCI.form.ListValue.html
Normal file
7322
jsapi/LuCI.form.ListValue.html
Normal file
File diff suppressed because it is too large
Load diff
5815
jsapi/LuCI.form.Map.html
Normal file
5815
jsapi/LuCI.form.Map.html
Normal file
File diff suppressed because it is too large
Load diff
7273
jsapi/LuCI.form.MultiValue.html
Normal file
7273
jsapi/LuCI.form.MultiValue.html
Normal file
File diff suppressed because it is too large
Load diff
6420
jsapi/LuCI.form.NamedSection.html
Normal file
6420
jsapi/LuCI.form.NamedSection.html
Normal file
File diff suppressed because it is too large
Load diff
7204
jsapi/LuCI.form.SectionValue.html
Normal file
7204
jsapi/LuCI.form.SectionValue.html
Normal file
File diff suppressed because it is too large
Load diff
7194
jsapi/LuCI.form.TableSection.html
Normal file
7194
jsapi/LuCI.form.TableSection.html
Normal file
File diff suppressed because it is too large
Load diff
7220
jsapi/LuCI.form.TextValue.html
Normal file
7220
jsapi/LuCI.form.TextValue.html
Normal file
File diff suppressed because it is too large
Load diff
6679
jsapi/LuCI.form.TypedSection.html
Normal file
6679
jsapi/LuCI.form.TypedSection.html
Normal file
File diff suppressed because it is too large
Load diff
7279
jsapi/LuCI.form.Value.html
Normal file
7279
jsapi/LuCI.form.Value.html
Normal file
File diff suppressed because it is too large
Load diff
3678
jsapi/LuCI.form.html
Normal file
3678
jsapi/LuCI.form.html
Normal file
File diff suppressed because it is too large
Load diff
5855
jsapi/LuCI.fs.html
Normal file
5855
jsapi/LuCI.fs.html
Normal file
File diff suppressed because it is too large
Load diff
3883
jsapi/LuCI.headers.html
Normal file
3883
jsapi/LuCI.headers.html
Normal file
File diff suppressed because it is too large
Load diff
8078
jsapi/LuCI.html
Normal file
8078
jsapi/LuCI.html
Normal file
File diff suppressed because it is too large
Load diff
6248
jsapi/LuCI.network.Device.html
Normal file
6248
jsapi/LuCI.network.Device.html
Normal file
File diff suppressed because it is too large
Load diff
4809
jsapi/LuCI.network.Hosts.html
Normal file
4809
jsapi/LuCI.network.Hosts.html
Normal file
File diff suppressed because it is too large
Load diff
8039
jsapi/LuCI.network.Protocol.html
Normal file
8039
jsapi/LuCI.network.Protocol.html
Normal file
File diff suppressed because it is too large
Load diff
5180
jsapi/LuCI.network.WifiDevice.html
Normal file
5180
jsapi/LuCI.network.WifiDevice.html
Normal file
File diff suppressed because it is too large
Load diff
7770
jsapi/LuCI.network.WifiNetwork.html
Normal file
7770
jsapi/LuCI.network.WifiNetwork.html
Normal file
File diff suppressed because it is too large
Load diff
9618
jsapi/LuCI.network.html
Normal file
9618
jsapi/LuCI.network.html
Normal file
File diff suppressed because it is too large
Load diff
4266
jsapi/LuCI.poll.html
Normal file
4266
jsapi/LuCI.poll.html
Normal file
File diff suppressed because it is too large
Load diff
5201
jsapi/LuCI.request.html
Normal file
5201
jsapi/LuCI.request.html
Normal file
File diff suppressed because it is too large
Load diff
4385
jsapi/LuCI.request.poll.html
Normal file
4385
jsapi/LuCI.request.poll.html
Normal file
File diff suppressed because it is too large
Load diff
4343
jsapi/LuCI.response.html
Normal file
4343
jsapi/LuCI.response.html
Normal file
File diff suppressed because it is too large
Load diff
5674
jsapi/LuCI.rpc.html
Normal file
5674
jsapi/LuCI.rpc.html
Normal file
File diff suppressed because it is too large
Load diff
4113
jsapi/LuCI.session.html
Normal file
4113
jsapi/LuCI.session.html
Normal file
File diff suppressed because it is too large
Load diff
7161
jsapi/LuCI.uci.html
Normal file
7161
jsapi/LuCI.uci.html
Normal file
File diff suppressed because it is too large
Load diff
5117
jsapi/LuCI.ui.AbstractElement.html
Normal file
5117
jsapi/LuCI.ui.AbstractElement.html
Normal file
File diff suppressed because it is too large
Load diff
5229
jsapi/LuCI.ui.Checkbox.html
Normal file
5229
jsapi/LuCI.ui.Checkbox.html
Normal file
File diff suppressed because it is too large
Load diff
5259
jsapi/LuCI.ui.ComboButton.html
Normal file
5259
jsapi/LuCI.ui.ComboButton.html
Normal file
File diff suppressed because it is too large
Load diff
5162
jsapi/LuCI.ui.Combobox.html
Normal file
5162
jsapi/LuCI.ui.Combobox.html
Normal file
File diff suppressed because it is too large
Load diff
5960
jsapi/LuCI.ui.Dropdown.html
Normal file
5960
jsapi/LuCI.ui.Dropdown.html
Normal file
File diff suppressed because it is too large
Load diff
5337
jsapi/LuCI.ui.DynamicList.html
Normal file
5337
jsapi/LuCI.ui.DynamicList.html
Normal file
File diff suppressed because it is too large
Load diff
5186
jsapi/LuCI.ui.FileUpload.html
Normal file
5186
jsapi/LuCI.ui.FileUpload.html
Normal file
File diff suppressed because it is too large
Load diff
4940
jsapi/LuCI.ui.Hiddenfield.html
Normal file
4940
jsapi/LuCI.ui.Hiddenfield.html
Normal file
File diff suppressed because it is too large
Load diff
5289
jsapi/LuCI.ui.Select.html
Normal file
5289
jsapi/LuCI.ui.Select.html
Normal file
File diff suppressed because it is too large
Load diff
5238
jsapi/LuCI.ui.Textarea.html
Normal file
5238
jsapi/LuCI.ui.Textarea.html
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue