2 LuCI iptables parser and query library
6 module "luci.sys.iptparser"
9 Create a new iptables parser object.
13 @param family Number specifying the address family. 4 for IPv4, 6 for IPv6
14 @return IptParser instance
18 Find all firewall rules that match the given criteria. Expects a table with
20 search criteria as only argument. If args is nil or an empty table then all
21 rules will be returned.
25 Rebuild the internal lookup table, for example when rules have changed
27 through external commands.
29 @name IptParser.resync
34 Find the names of all tables.
37 @name IptParser.tables
38 @return Table of table names.
42 Find the names of all chains within the given table name.
45 @name IptParser.chains
46 @param table String containing the table name
47 @return Table of chain names in the order they occur.
51 Return the given firewall chain within the given table name.
55 @param table String containing the table name
56 @param chain String containing the chain name
57 @return Table containing the fields "policy", "packets", "bytes"
58 -- and "rules". The "rules" field is a table of rule tables.
62 Test whether the given target points to a custom chain.
65 @name IptParser.is_custom_target
66 @param target String containing the target action
67 @return Boolean indicating whether target is a custom chain.