Object Instance luci.sys.iptparser
+
+
+
+
+
+
+
+
+
+Functions
+IptParser (family) | ++ +Create a new iptables parser object. | +
IptParser:chain (table, chain) | ++ +Return the given firewall chain within the given table name. | +
IptParser:chains (table) | ++ +Find the names of all chains within the given table name. | +
IptParser:is_custom_target (target) | ++ +Test whether the given target points to a custom chain. | +
IptParser:resync () | ++ +Rebuild the internal lookup table, for example when rules have changed + +through external commands. | +
IptParser:tables () | ++ +Find the names of all tables. | +
+
+ + +
Functions
+-
+
+
+
+
- IptParser (family) +
-
+
+
+Create a new iptables parser object.
+
+
+
+
Parameters
+-
+
+
- + family: Number specifying the address family. 4 for IPv4, 6 for IPv6 + + +
Return value:
+IptParser instance + + + +
+
+
+
+
+ - IptParser:chain (table, chain) +
-
+
+
+Return the given firewall chain within the given table name.
+
+
+
+
Parameters
+-
+
+
- + table: String containing the table name + + +
- + chain: String containing the chain name + + +
Return value:
+Table containing the fields "policy", "packets", "bytes" + and "rules". The "rules" field is a table of rule tables. + + + +
+
+
+
+
+ - IptParser:chains (table) +
-
+
+
+Find the names of all chains within the given table name.
+
+
+
+
Parameters
+-
+
+
- + table: String containing the table name + + +
Return value:
+Table of chain names in the order they occur. + + + +
+
+
+
+
+ - IptParser:is_custom_target (target) +
-
+
+
+Test whether the given target points to a custom chain.
+
+
+
+
Parameters
+-
+
+
- + target: String containing the target action + + +
Return value:
+Boolean indicating whether target is a custom chain. + + + +
+
+
+
+
+ - IptParser:resync () +
-
+
+
+Rebuild the internal lookup table, for example when rules have changed
+
+through external commands.
+
+
+
+
+
+
+
+
Return value:
+nothing + + + +
+
+
+
+
+ - IptParser:tables () +
-
+
+
+Find the names of all tables.
+
+
+
+
+
+
+
+
+
Return value:
+Table of table names. + + + +
+
+
+