summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-iptparser/luasrc/sys/iptparser.luadoc
blob: 071e7d52e4289d0ce985bd9e78e91a76a36759a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---[[
LuCI iptables parser and query library

@cstyle	instance
]]
module "luci.sys.iptparser"

---[[
Create a new iptables parser object.

@class	function
@name	IptParser
@param	family	Number specifying the address family. 4 for IPv4, 6 for IPv6
@return	IptParser instance
]]

---[[
Find all firewall rules that match the given criteria. Expects a table with

search criteria as only argument. If args is nil or an empty table then all
rules will be returned.
]]

---[[
Rebuild the internal lookup table, for example when rules have changed

through external commands.
@class function
@name IptParser.resync
@return	nothing
]]

---[[
Find the names of all tables.

@class function
@name IptParser.tables
@return		Table of table names.
]]

---[[
Find the names of all chains within the given table name.

@class function
@name IptParser.chains
@param table	String containing the table name
@return		Table of chain names in the order they occur.
]]

---[[
Return the given firewall chain within the given table name.

@class function
@name IptParser.chain
@param table	String containing the table name
@param chain	String containing the chain name
@return		Table containing the fields "policy", "packets", "bytes"
--				and "rules". The "rules" field is a table of rule tables.
]]

---[[
Test whether the given target points to a custom chain.

@class function
@name IptParser.is_custom_target
@param target	String containing the target action
@return			Boolean indicating whether target is a custom chain.
]]