--[[
-FFLuCI - Iptables parser and query library
+LuCI - Iptables parser and query library
Copyright 2008 Jo-Philipp Wich <freifunk@wwsnet.net>
]]--
-module("ffluci.sys.iptparser", package.seeall)
-require("ffluci.sys")
-require("ffluci.util")
+module("luci.sys.iptparser", package.seeall)
+require("luci.sys")
+require("luci.util")
-IptParser = ffluci.util.class()
+IptParser = luci.util.class()
--[[
IptParser.__init__( ... )
Example:
-ip = ffluci.sys.iptparser.IptParser()
+ip = luci.sys.iptparser.IptParser()
result = ip.find( {
target="REJECT",
protocol="tcp",
for i, tbl in ipairs({ "filter", "nat", "mangle" }) do
- for i, rule in ipairs(ffluci.sys.execl("iptables -t " .. tbl .. " --line-numbers -nxvL")) do
+ for i, rule in ipairs(luci.sys.execl("iptables -t " .. tbl .. " --line-numbers -nxvL")) do
if rule:find( "Chain " ) == 1 then
else
if rule:find("%d") == 1 then
- local rule_parts = ffluci.util.split( rule, "%s+", nil, true )
+ local rule_parts = luci.util.split( rule, "%s+", nil, true )
local rule_details = { }
rule_details["table"] = tbl