[PATCH] add tools to scan network for any device, or for sip devices, and output...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 17 Jul 2009 20:27:05 +0000 (20:27 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 17 Jul 2009 20:27:05 +0000 (20:27 +0000)
39 files changed:
applications/luci-diag-core/Makefile [new file with mode: 0644]
applications/luci-diag-core/luasrc/controller/luci_diag.lua [new file with mode: 0644]
applications/luci-diag-core/luasrc/view/diag/index.htm [new file with mode: 0644]
applications/luci-diag-core/luasrc/view/diag/network_config_index.htm [new file with mode: 0644]
applications/luci-diag-devinfo/Makefile [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/controller/luci_diag/netdiscover_common.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/controller/luci_diag/smap_common.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/mactodevinfo.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config_mini.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_mini.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config_mini.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/view/diag/smapsection.htm [new file with mode: 0644]
applications/luci-diag-devinfo/luasrc/view/diag/smapvalue.htm [new file with mode: 0644]
applications/luci-diag-devinfo/root/etc/config/luci_devinfo [new file with mode: 0644]
applications/luci-diag-devinfo/root/lib/uci/schema/default/luci_devinfo [new file with mode: 0644]
applications/luci-diag-devinfo/root/lib/uci/schema/default/mactodevinfo [new file with mode: 0644]
applications/luci-voice-core/Makefile [new file with mode: 0644]
applications/luci-voice-core/luasrc/controller/luci_voice.lua [new file with mode: 0644]
applications/luci-voice-core/luasrc/view/luci_voice/index.htm [new file with mode: 0644]
applications/luci-voice-core/luasrc/view/luci_voice/phone_index.htm [new file with mode: 0644]
applications/luci-voice-diag/Makefile [new file with mode: 0644]
applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua [new file with mode: 0644]
applications/luci-voice-diag/luasrc/view/luci_voice/diag_index.htm [new file with mode: 0644]
contrib/package/luci/Makefile
po/en/diag_core.po [new file with mode: 0644]
po/en/diag_devinfo.po [new file with mode: 0644]
po/en/voice_core.po [new file with mode: 0644]
po/en/voice_diag.po [new file with mode: 0644]
po/templates/diag_core.pot [new file with mode: 0644]
po/templates/diag_devinfo.pot [new file with mode: 0644]
po/templates/voice_core.pot [new file with mode: 0644]
po/templates/voice_diag.pot [new file with mode: 0644]

diff --git a/applications/luci-diag-core/Makefile b/applications/luci-diag-core/Makefile
new file mode 100644 (file)
index 0000000..1551874
--- /dev/null
@@ -0,0 +1,4 @@
+PO = diag_core
+
+include ../../build/config.mk
+include ../../build/module.mk
diff --git a/applications/luci-diag-core/luasrc/controller/luci_diag.lua b/applications/luci-diag-core/luasrc/controller/luci_diag.lua
new file mode 100644 (file)
index 0000000..396d4cf
--- /dev/null
@@ -0,0 +1,31 @@
+--[[
+
+Luci Voice Core
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+require("luci.i18n")
+
+module("luci.controller.luci_diag", package.seeall)
+
+function index()
+   require("luci.i18n")
+   luci.i18n.loadc("diag_core")
+
+   local e = entry({"admin", "network", "diag_config"}, template("diag/network_config_index") , luci.i18n.translate("l_d_diag_config"), 120)
+   e.index = true
+   e.i18n = "diag_core"
+   e.dependent = true
+
+   e = entry({"mini", "diag"}, template("diag/index"), luci.i18n.translate("l_d_diag"), 120)
+   e.index = true
+   e.i18n = "diag_core"
+   e.dependent = true
+end
diff --git a/applications/luci-diag-core/luasrc/view/diag/index.htm b/applications/luci-diag-core/luasrc/view/diag/index.htm
new file mode 100644 (file)
index 0000000..5a9a8ab
--- /dev/null
@@ -0,0 +1,18 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+<%+header%>
+<h2><a id="content" name="content"><%:l_d_c_i_diag%></a></h2>
+<p><%:l_d_c_i_diag1%></p>
+<p><%:l_d_c_i_diag2%></p>
+<%+footer%>
diff --git a/applications/luci-diag-core/luasrc/view/diag/network_config_index.htm b/applications/luci-diag-core/luasrc/view/diag/network_config_index.htm
new file mode 100644 (file)
index 0000000..b1e7559
--- /dev/null
@@ -0,0 +1,18 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+<%+header%>
+<h2><a id="content" name="content"><%:l_d_c_nci_diag%></a></h2>
+<p><%:l_d_c_nci_diag1%></p>
+<p><%:l_d_c_nci_diag2%></p>
+<%+footer%>
diff --git a/applications/luci-diag-devinfo/Makefile b/applications/luci-diag-devinfo/Makefile
new file mode 100644 (file)
index 0000000..3844248
--- /dev/null
@@ -0,0 +1,4 @@
+PO=diag_devinfo
+
+include ../../build/config.mk
+include ../../build/module.mk
diff --git a/applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua b/applications/luci-diag-devinfo/luasrc/controller/luci_diag/devinfo_common.lua
new file mode 100644 (file)
index 0000000..58009c5
--- /dev/null
@@ -0,0 +1,193 @@
+--[[
+
+Luci diag - Diagnostics controller module
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+module("luci.controller.luci_diag.devinfo_common", package.seeall)
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.cbi")
+require("luci.model.uci")
+
+local translate = luci.i18n.translate
+local DummyValue = luci.cbi.DummyValue
+local SimpleSection = luci.cbi.SimpleSection
+
+function run_processes(outnets, cmdfunc)
+   i = next(outnets, nil)
+   while (i) do
+      outnets[i]["output"] = luci.sys.exec(cmdfunc(outnets, i))
+      i = next(outnets, i)
+   end
+end
+
+function parse_output(devmap, outnets, haslink, type, mini, debug)
+   local curnet = next(outnets, nil)
+
+   luci.i18n.loadc("diag_devinfo")
+
+   while (curnet) do
+      local output = outnets[curnet]["output"]
+      local subnet = outnets[curnet]["subnet"]
+      local ports = outnets[curnet]["ports"]
+      local interface = outnets[curnet]["interface"]
+      local netdevs = {}
+      devlines = luci.util.split(output)
+      if not devlines then
+        devlines = {}
+        table.insert(devlines, output)
+      end
+           
+      local j = nil
+      j = next(devlines, j)
+      
+      local found_a_device = false
+      
+      while (j) do
+        if devlines[j] and ( devlines[j] ~= "" ) then
+           found_a_device = true
+           local devtable
+           local row = {}
+           devtable = luci.util.split(devlines[j], ' | ')
+           row["ip"] = devtable[1]
+           if (not mini) then
+              row["mac"] = devtable[2]
+           end
+           if ( devtable[4] == 'unknown' ) then 
+              row["vendor"] = devtable[3]
+           else
+              row["vendor"] = devtable[4]
+           end
+           row["type"] = devtable[5]
+           if (not mini) then
+              row["model"] = devtable[6]
+           end
+           if (haslink) then
+              row["config_page"] = devtable[7]
+           end
+           
+           if (debug) then
+              row["raw"] = devlines[j]
+           end
+           table.insert(netdevs, row)
+        end
+        j = next(devlines, j)
+      end
+      if not found_a_device then
+        local row = {}
+        row["ip"] = curnet
+        if (not mini) then
+           row["mac"] = ""
+        end
+        if (type == "smap") then
+           row["vendor"] = luci.i18n.translate("l_d_d_dc_nosipdev")
+        else
+           row["vendor"] = luci.i18n.translate("l_d_d_dc_nodev")
+        end
+        row["type"] = luci.i18n.translate("l_d_d_dc_checkothernet")
+        if (not mini) then
+           row["model"] = ""
+        end
+        if (haslink) then
+           row["config_page"] = ""
+        end
+        if (debug) then
+           row["raw"] = output
+        end
+        table.insert(netdevs, row)
+      end       
+      local s
+      if (type == "smap") then
+        if (mini) then
+           s = devmap:section(luci.cbi.Table, netdevs, luci.i18n.translate("l_d_d_dc_sipdev_found_mini") .. " " .. curnet)
+        else
+           local interfacestring = ""
+           if ( interface ~= "" ) then
+              interfacestring = ", " .. interface
+           end
+           s = devmap:section(luci.cbi.Table, netdevs, luci.i18n.translate("l_d_d_dc_sipdev_found_admin") .. " " .. curnet .. " (" .. subnet .. ":" .. ports .. interfacestring .. ")")
+        end
+        s.template = "diag/smapsection"
+      else
+        if (mini) then
+           s = devmap:section(luci.cbi.Table, netdevs, luci.i18n.translate("l_dd_dc_netdev_found_mini") .. " " .. curnet)
+        else
+           local interfacestring = ""
+           if ( interface ~= "" ) then
+              interfacestring = ", " .. interface
+           end
+           s = devmap:section(luci.cbi.Table, netdevs, luci.i18n.translate("l_d_d_dc_netdev_found_admin", "Devices discovered for") .. " " .. curnet .. " (" .. subnet .. interfacestring .. ")")
+        end
+      end
+      s:option(DummyValue, "ip", translate("l_d_d_dc_mac_ip"))
+      if (not mini) then
+        s:option(DummyValue, "mac", translate("l_d_d_dc_mac_address"))
+      end
+      s:option(DummyValue, "vendor", translate("l_d_d_dc_mac_vendor"))
+      s:option(DummyValue, "type", translate("l_d_d_dc_mac_device_type"))
+      if (not mini) then
+        s:option(DummyValue, "model", translate("l_d_d_dc_mac_model"))
+      end
+      if (haslink) then
+        s:option(DummyValue, "config_page", translate("l_d_d_dc_config_page"))
+      end
+      if (debug) then
+        s:option(DummyValue, "raw", translate("l_d_d_dc_raw"))
+      end
+      curnet = next(outnets, curnet)
+   end
+end
+
+function get_network_device(interface)
+   local state = luci.model.uci.cursor_state()
+   state:load("network")
+   local dev
+   
+   return state:get("network", interface, "ifname")
+end
+
+
+function cbi_add_networks(field)
+       uci.cursor():foreach("network", "interface",
+               function (section)
+                       if section[".name"] ~= "loopback" then
+                               field:value(section[".name"])
+                       end
+               end
+       )
+       field.titleref = luci.dispatcher.build_url("admin", "network", "network")
+end
+
+function config_devinfo_scan(map, scannet)
+   local o
+   o = scannet:option(luci.cbi.Flag, "enable", translate("l_d_d_dc_enable"))
+   o.optional = false
+   o.rmempty = false
+
+   o = scannet:option(luci.cbi.Value, "interface", translate("l_d_d_dc_interface"))
+   o.optional = false
+   luci.controller.luci_diag.devinfo_common.cbi_add_networks(o)
+   
+   local scansubnet
+   scansubnet = scannet:option(luci.cbi.Value, "subnet", translate("l_d_d_dc_subnet"))
+   scansubnet.optional = false
+   
+   o = scannet:option(luci.cbi.Value, "timeout", translate("l_d_d_dc_timeout"), translate("l_d_d_dc_timeout_descr"))
+   o.optional = true
+   
+   o = scannet:option(luci.cbi.Value, "repeat_count", translate("l_d_d_dc_repeat_count"), translate("l_d_d_dc_repeat_count_descr"))
+   o.optional = true
+   
+   o = scannet:option(luci.cbi.Value, "sleepreq", translate("l_d_d_dc_sleep"), translate("l_d_d_dc_sleep_desc"))
+   o.optional = true
+end
\ No newline at end of file
diff --git a/applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua b/applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua
new file mode 100644 (file)
index 0000000..0d8da66
--- /dev/null
@@ -0,0 +1,69 @@
+--[[
+
+Luci diag - Diagnostics controller module
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+
+module("luci.controller.luci_diag.luci_diag_devinfo", package.seeall)
+
+function index()
+   require("luci.i18n")
+   luci.i18n.loadc("diag_devinfo")
+
+   local e = entry({"admin", "voice", "diag", "phones"}, arcombine(cbi("luci_diag/smap_devinfo"), cbi("luci_diag/smap_devinfo_config")), luci.i18n.translate("l_d_d_ldd_diag_smap_devinfo"), 10)
+   e.leaf = true
+   e.subindex = true
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"admin", "voice", "diag", "phones", "config"}, cbi("luci_diag/smap_devinfo_config"), luci.i18n.translate("l_d_d_ldd_config"), 10)
+   e.i18n = "diag_devinfo"
+
+   e = entry({"admin", "status", "smap_devinfo"}, cbi("luci_diag/smap_devinfo"), luci.i18n.translate("l_d_d_ldd_smap_devinfo_config"), 120)
+   e.leaf = true
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"admin", "network", "diag_config", "netdiscover_devinfo_config"}, cbi("luci_diag/netdiscover_devinfo_config"), luci.i18n.translate("l_d_d_ldd_netdiscover_devinfo_scan"), 100)
+   e.leaf = true
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"admin", "network", "diag_config", "smap_devinfo_config"}, cbi("luci_diag/smap_devinfo_config"), luci.i18n.translate("l_d_d_ldd_smap_devinfo_scan_config"))
+   e.leaf = true
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"admin", "status", "netdiscover_devinfo"}, cbi("luci_diag/netdiscover_devinfo"), luci.i18n.translate("l_d_d_ldd_netdiscover_devinfo"), 90)
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"admin", "network", "mactodevinfo"}, cbi("luci_diag/mactodevinfo"), luci.i18n.translate("l_d_d_ldd_mac_to_devinfo_overrides"), 190)
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"mini", "diag", "phone_scan"}, cbi("luci_diag/smap_devinfo_mini"), luci.i18n.translate("l_d_d_ldd_diag_smap_devinfo_scan_mini"), 100)
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"mini", "voice", "phones", "phone_scan_config"}, cbi("luci_diag/smap_devinfo_config_mini"), luci.i18n.translate("l_d_d_ldd_smap_devinfo_config_scan_miini"), 90)
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"mini", "diag", "netdiscover_devinfo"}, cbi("luci_diag/netdiscover_devinfo_mini"), luci.i18n.translate("l_d_d_ldd_diag_netdiscover_devinfo_scan_mini"), 10)
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+   e = entry({"mini", "network", "netdiscover_devinfo_config"}, cbi("luci_diag/netdiscover_devinfo_config_mini"), luci.i18n.translate("l_d_d_ldd_netdiscover_devinfo_scan_config_mini"))
+   e.i18n = "diag_devinfo"
+   e.dependent = true
+
+end
diff --git a/applications/luci-diag-devinfo/luasrc/controller/luci_diag/netdiscover_common.lua b/applications/luci-diag-devinfo/luasrc/controller/luci_diag/netdiscover_common.lua
new file mode 100644 (file)
index 0000000..71dc340
--- /dev/null
@@ -0,0 +1,99 @@
+--[[
+
+Luci diag - Diagnostics controller module
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+module("luci.controller.luci_diag.netdiscover_common", package.seeall)
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.cbi")
+require("luci.model.uci")
+
+local translate = luci.i18n.translate
+local DummyValue = luci.cbi.DummyValue
+local SimpleSection = luci.cbi.SimpleSection
+
+        
+function get_params()
+
+   local netdiscover_uci = luci.model.uci.cursor()
+   netdiscover_uci:load("luci_devinfo")
+   local nettable = netdiscover_uci:get_all("luci_devinfo")
+
+   local i 
+   local subnet
+   local netdout
+
+   local outnets = {}
+
+   i = next(nettable, nil)
+
+   while (i) do
+      if (netdiscover_uci:get("luci_devinfo", i) == "netdiscover_scannet") then 
+        local scannet = netdiscover_uci:get_all("luci_devinfo", i)
+        if scannet["subnet"] and (scannet["subnet"] ~= "") and scannet["enable"] and ( scannet["enable"] == "1") then
+           local output = ""
+           local outrow = {}
+           outrow["interface"] = scannet["interface"]
+           outrow["timeout"] = 10
+           local timeout = tonumber(scannet["timeout"]) 
+           if timeout and ( timeout > 0 ) then
+              outrow["timeout"] = scannet["timeout"]
+           end
+
+           outrow["repeat_count"] = 1
+           local repcount = tonumber(scannet["repeat_count"]) 
+           if repcount and ( repcount > 0 ) then
+              outrow["repeat_count"] = scannet["repeat_count"]
+           end
+
+           outrow["sleepreq"] = 100
+           local repcount = tonumber(scannet["sleepreq"]) 
+           if repcount and ( repcount > 0 ) then
+              outrow["sleepreq"] = scannet["sleepreq"]
+           end
+
+           outrow["subnet"] = scannet["subnet"]    
+           outrow["output"] = output
+           outnets[i] = outrow
+        end
+      end
+      i = next(nettable, i)
+   end
+   return outnets
+end
+
+function command_function(outnets, i)
+   local interface = luci.controller.luci_diag.devinfo_common.get_network_device(outnets[i]["interface"])
+   
+   return "/usr/bin/netdiscover-to-devinfo " .. outnets[i]["subnet"] .. " " .. interface .. " " .. outnets[i]["timeout"] .. " -r " .. outnets[i]["repeat_count"] .. " -s " .. outnets[i]["sleepreq"] .. " </dev/null"
+end
+
+function action_links(netdiscovermap, mini) 
+   luci.i18n.loadc("diag_devinfo")
+   s = netdiscovermap:section(SimpleSection, "", translate("l_d_d_nc_netdiscover_actions")) 
+   b = s:option(DummyValue, "_config", translate("l_d_d_nc_config_scan"))
+   b.value = ""
+   if (mini) then
+      b.titleref = luci.dispatcher.build_url("mini", "network", "netdiscover_devinfo_config")
+   else
+      b.titleref = luci.dispatcher.build_url("admin", "network", "diag_config", "netdiscover_devinfo_config")
+   end
+   b = s:option(DummyValue, "_scans", translate("l_d_d_nc_redo_scans"))
+   b.value = ""
+   if (mini) then
+      b.titleref = luci.dispatcher.build_url("mini", "diag", "netdiscover_devinfo")
+   else
+      b.titleref = luci.dispatcher.build_url("admin", "status", "netdiscover_devinfo")
+   end
+end
\ No newline at end of file
diff --git a/applications/luci-diag-devinfo/luasrc/controller/luci_diag/smap_common.lua b/applications/luci-diag-devinfo/luasrc/controller/luci_diag/smap_common.lua
new file mode 100644 (file)
index 0000000..e5cf14d
--- /dev/null
@@ -0,0 +1,109 @@
+--[[
+
+Luci diag - Diagnostics controller module
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+module("luci.controller.luci_diag.smap_common", package.seeall)
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.cbi")
+require("luci.model.uci")
+
+local translate = luci.i18n.translate
+local DummyValue = luci.cbi.DummyValue
+local SimpleSection = luci.cbi.SimpleSection
+
+function get_params()
+
+   local smapnets_uci = luci.model.uci.cursor()
+   smapnets_uci:load("luci_devinfo")
+   local nettable = smapnets_uci:get_all("luci_devinfo")
+
+   local i 
+   local subnet
+   local smapout
+
+   local outnets = {}
+
+   i = next(nettable, nil)
+
+   while (i) do
+      if (smapnets_uci:get("luci_devinfo", i) == "smap_scannet") then 
+        local scannet = smapnets_uci:get_all("luci_devinfo", i)
+        if scannet["subnet"] and (scannet["subnet"] ~= "") and scannet["enable"] and ( scannet["enable"] == "1") then
+           local output = ""
+           local outrow = {}
+           outrow["subnet"] = scannet["subnet"]
+           ports = "5060"
+           if scannet["ports"] and ( scannet["ports"] ~= "" ) then
+              ports = scannet["ports"]          
+           end
+           outrow["timeout"] = 10
+           local timeout = tonumber(scannet["timeout"]) 
+           if timeout and ( timeout > 0 ) then
+              outrow["timeout"] = scannet["timeout"]
+           end
+
+           outrow["repeat_count"] = 1
+           local repcount = tonumber(scannet["repeat_count"]) 
+           if repcount and ( repcount > 0 ) then
+              outrow["repeat_count"] = scannet["repeat_count"]
+           end
+
+           outrow["sleepreq"] = 100
+           local repcount = tonumber(scannet["sleepreq"]) 
+           if repcount and ( repcount > 0 ) then
+              outrow["sleepreq"] = scannet["sleepreq"]
+           end
+
+           if scannet["interface"] and ( scannet["interface"] ~= "" ) then
+              outrow["interface"] = scannet["interface"]
+           else
+              outrow["interface"] = ""
+           end
+
+           outrow["ports"] = ports
+           outrow["output"] = output
+           outnets[i] = outrow
+        end
+      end
+      i = next(nettable, i)
+   end
+   return outnets
+end
+
+function command_function(outnets, i) 
+
+   local interface = luci.controller.luci_diag.devinfo_common.get_network_device(outnets[i]["interface"])
+
+   return "/usr/bin/netsmap-to-devinfo -r " .. outnets[i]["subnet"] .. " -t " .. outnets[i]["timeout"] .. " -i " .. interface .. " -x -p " ..  outnets[i]["ports"]  .. " -c " .. outnets[i]["repeat_count"] .. " -s " .. outnets[i]["sleepreq"] .. " </dev/null"
+end
+
+function action_links(smapmap, mini) 
+   luci.i18n.loadc("diag_devinfo")
+   s = smapmap:section(SimpleSection, "", translate("l_d_d_sc_smap_actions")) 
+   b = s:option(DummyValue, "_config", translate("l_d_d_sc_config_scan"))
+   b.value = ""
+   if (mini) then
+      b.titleref = luci.dispatcher.build_url("mini", "voice", "phones", "phone_scan_config")
+   else
+      b.titleref = luci.dispatcher.build_url("admin", "network", "diag_config", "smap_devinfo_config")
+   end
+   b = s:option(DummyValue, "_scans", translate("l_d_d_sc_redo_scans"))
+   b.value = ""
+   if (mini) then
+      b.titleref = luci.dispatcher.build_url("mini", "diag", "phone_scan")
+   else
+      b.titleref = luci.dispatcher.build_url("admin", "status", "smap_devinfo")
+   end
+end
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/mactodevinfo.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/mactodevinfo.lua
new file mode 100644 (file)
index 0000000..548ddbe
--- /dev/null
@@ -0,0 +1,36 @@
+--[[
+LuCI - Lua Configuration Interface
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+m = Map("mactodevinfo", luci.i18n.translate("l_d_d_m_mac_to_devinfo_override"), translate("l_d_d_m_mac_to_devinfo_override_descr"))
+
+s = m:section(TypedSection, "mactodevinfo", translate("l_d_d_m_mac_to_devinfo_section"), translate("l_d_d_m_mac_to_devinfo_section_descr"))
+s.addremove = true
+s.anonymous = true
+
+v = s:option(Value, "name", translate("l_d_d_m_name"))
+v.optional = true
+v = s:option(Value, "maclow", translate("l_d_d_m_maclow"))
+v.optional = false
+v = s:option(Value, "machigh", translate("l_d_d_m_machigh"))
+v.optional = false
+v = s:option(Value, "vendor", translate("l_d_d_m_vendor"))
+v.optional = false
+v = s:option(Value, "devtype", translate("l_d_d_m_mactodevinfo_devtype"))
+v.optional = false
+v = s:option(Value, "model", translate("l_d_d_m_model"))
+v.optional = false
+v = s:option(Value, "ouiowneroverride", translate("l_d_d_m_ouiowneroverride"))
+v.optional = true
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo.lua
new file mode 100644 (file)
index 0000000..34ce02a
--- /dev/null
@@ -0,0 +1,31 @@
+--[[
+netdiscover_devinfo - SIP Device Information
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.model.uci")
+
+local debug = false
+
+m = SimpleForm("luci_devinfo", translate("l_d_d_nd_netdiscover_to_devinfo"), translate("l_d_d_nd_netdiscover_to_devinfo_descr"))
+m.reset = false
+m.submit = false
+
+local outnets = luci.controller.luci_diag.netdiscover_common.get_params()
+luci.controller.luci_diag.devinfo_common.run_processes(outnets, luci.controller.luci_diag.netdiscover_common.command_function)
+luci.controller.luci_diag.devinfo_common.parse_output(m, outnets, false, "netdiscover", false, debug)
+luci.controller.luci_diag.netdiscover_common.action_links(m, false)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config.lua
new file mode 100644 (file)
index 0000000..7b5f0d4
--- /dev/null
@@ -0,0 +1,30 @@
+--[[
+LuCI - Lua Configuration Interface
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.controller.luci_diag.devinfo_common")
+
+m = Map("luci_devinfo", translate("l_d_d_ndc_netdiscover_to_devinfo_config"), translate("l_d_d_ndc_netdiscover_to_devinfo_config_descr"))
+
+s = m:section(SimpleSection, "", translate("l_d_d_ndc_use_config"))
+b = s:option(DummyValue, "_scans", translate("l_d_d_ndc_do_scans"))
+b.value = ""
+b.titleref = luci.dispatcher.build_url("admin", "status", "netdiscover_devinfo")
+
+scannet = m:section(TypedSection, "netdiscover_scannet", translate("l_d_d_ndc_netdiscover_scannet"), translate("l_d_d_ndc_netdiscover_scannet_descr"))
+scannet.addremove = true
+scannet.anonymous = false
+
+luci.controller.luci_diag.devinfo_common.config_devinfo_scan(m, scannet)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config_mini.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_config_mini.lua
new file mode 100644 (file)
index 0000000..9f06864
--- /dev/null
@@ -0,0 +1,30 @@
+--[[
+LuCI - Lua Configuration Interface
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.controller.luci_diag.devinfo_common")
+
+m = Map("luci_devinfo", translate("l_d_d_ndc_netdiscover_to_devinfo_config_mini"), translate("l_d_d_ndc_mini_netdiscover_to_devinfo_config_descr"))
+
+s = m:section(SimpleSection, "", translate("l_d_d_ndc_mini_use_config"))
+b = s:option(DummyValue, "_scans", translate("l_d_d_ndc_mini_do_scans"))
+b.value = ""
+b.titleref = luci.dispatcher.build_url("mini", "diag", "netdiscover_devinfo")
+
+scannet = m:section(TypedSection, "netdiscover_scannet", translate("l_d_d_ndc_mini_netdiscover_scannet"), translate("l_d_d_ndc_mini_netdiscover_scannet_descr"))
+scannet.addremove = true
+scannet.anonymous = false
+
+luci.controller.luci_diag.devinfo_common.config_devinfo_scan(m, scannet)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_mini.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/netdiscover_devinfo_mini.lua
new file mode 100644 (file)
index 0000000..8bdc1e6
--- /dev/null
@@ -0,0 +1,31 @@
+--[[
+netdiscover_devinfo - SIP Device Information
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.model.uci")
+
+local debug = false
+
+m = SimpleForm("luci_devinfo", translate("l_d_d_nd_mini_netdiscover_to_devinfo"), translate("l_d_d_nd_mini_netdiscover_to_devinfo_descr"))
+m.reset = false
+m.submit = false
+
+local outnets = luci.controller.luci_diag.netdiscover_common.get_params()
+luci.controller.luci_diag.devinfo_common.run_processes(outnets, luci.controller.luci_diag.netdiscover_common.command_function)
+luci.controller.luci_diag.devinfo_common.parse_output(m, outnets, false, "netdiscover", true, debug)
+luci.controller.luci_diag.netdiscover_common.action_links(m, true)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua
new file mode 100644 (file)
index 0000000..99d3214
--- /dev/null
@@ -0,0 +1,31 @@
+--[[
+smap_devinfo - SIP Device Information
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.model.uci")
+
+local debug = false
+
+m = SimpleForm("luci-smap-to-devinfo", translate("l_d_d_sd_smap_to_devinfo"), translate("l_d_d_sd_smap_to_devinfo_descr"))
+m.reset = false
+m.submit = false
+
+local outnets = luci.controller.luci_diag.smap_common.get_params()
+luci.controller.luci_diag.devinfo_common.run_processes(outnets, luci.controller.luci_diag.smap_common.command_function)
+luci.controller.luci_diag.devinfo_common.parse_output(m, outnets, true, "smap", false, debug)
+luci.controller.luci_diag.smap_common.action_links(m, false)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config.lua
new file mode 100644 (file)
index 0000000..a508475
--- /dev/null
@@ -0,0 +1,35 @@
+--[[
+LuCI - Lua Configuration Interface
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.controller.luci_diag.devinfo_common")
+
+m = Map("luci_devinfo", translate("l_d_d_sdc_smap_to_devinfo_config"), translate("l_d_d_sdc_smap_to_devinfo_config_descr"))
+
+s = m:section(SimpleSection, "", translate("l_d_d_sdc_use_config"))
+b = s:option(DummyValue, "_scans", translate("l_d_d_sdc_do_scans"))
+b.value = ""
+b.titleref = luci.dispatcher.build_url("admin", "status", "smap_devinfo")
+
+scannet = m:section(TypedSection, "smap_scannet", translate("l_d_d_sdc_smap_scannet"), translate("smap_scannet_descr"))
+scannet.addremove = true
+scannet.anonymous = false
+
+local ports
+ports = scannet:option(Value, "ports", translate("l_d_d_sdc_ports"))
+ports.optional = true
+ports.rmempty = true
+
+luci.controller.luci_diag.devinfo_common.config_devinfo_scan(m, scannet)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config_mini.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_config_mini.lua
new file mode 100644 (file)
index 0000000..f68af90
--- /dev/null
@@ -0,0 +1,34 @@
+--[[
+LuCI - Lua Configuration Interface
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+m = Map("luci_devinfo", translate("l_d_d_sdc_mini_smap_to_devinfo_config"), translate("l_d_d_sdc_mini_smap_to_devinfo_config_descr"))
+
+s = m:section(SimpleSection, "", translate("l_d_d_sdc_mini_use_config"))
+b = s:option(DummyValue, "_scans", translate("l_d_d_sdc_mini_do_scans"))
+b.value = ""
+b.titleref = luci.dispatcher.build_url("mini", "diag", "phone_scan")
+
+scannet = m:section(TypedSection, "smap_scannet", translate("l_d_d_sdc_mini_smap_scannet"), translate("l_d_d_sdc_mini_smap_scannet_descr"))
+scannet.addremove = true
+scannet.anonymous = false
+
+local ports
+ports = scannet:option(Value, "ports", translate("l_d_d_sdc_mini_ports"))
+ports.optional = true
+ports.rmempty = true
+
+luci.controller.luci_diag.devinfo_common.config_devinfo_scan(m, scannet)
+
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua b/applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo_mini.lua
new file mode 100644 (file)
index 0000000..3f695a0
--- /dev/null
@@ -0,0 +1,31 @@
+--[[
+smap_devinfo - SIP Device Information
+
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+require("luci.i18n")
+require("luci.util")
+require("luci.sys")
+require("luci.model.uci")
+
+local debug = false
+
+m = SimpleForm("luci-smap-to-devinfo", translate("l_d_d_sd_mini_smap_to_devinfo"), translate("l_d_d_sd_mini_smap_to_devinfo_descr"))
+m.reset = false
+m.submit = false
+
+local outnets = luci.controller.luci_diag.smap_common.get_params()
+luci.controller.luci_diag.devinfo_common.run_processes(outnets, luci.controller.luci_diag.smap_common.command_function)
+luci.controller.luci_diag.devinfo_common.parse_output(m, outnets, true, "smap", true, debug)
+luci.controller.luci_diag.smap_common.action_links(m, true)
+
+return m
diff --git a/applications/luci-diag-devinfo/luasrc/view/diag/smapsection.htm b/applications/luci-diag-devinfo/luasrc/view/diag/smapsection.htm
new file mode 100644 (file)
index 0000000..1fbbfdc
--- /dev/null
@@ -0,0 +1,137 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+<%-
+local rowcnt = 1
+function rowstyle()
+       rowcnt = rowcnt + 1
+       return (rowcnt % 2) + 1
+end
+-%>
+
+<!-- smapsection -->
+<fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
+       <% if self.title and #self.title > 0 then -%>
+               <legend><%=self.title%></legend>
+       <%- end %>
+       <div class="cbi-section-descr"><%=self.description%></div>
+       <div class="cbi-section-node">
+               <%- local count = 0 -%>
+               <table class="cbi-section-table">
+                       <tr class="cbi-section-table-titles">
+                       <%- if not self.anonymous then -%>
+                               <%- if self.sectionhead then -%>
+                                       <th class="cbi-section-table-cell"><%=self.sectionhead%></th>
+                               <%- else -%>
+                                       <th>&#160;</th>
+                               <%- end -%>
+                       <%- end -%>
+                       <%- for i, k in pairs(self.children) do if not k.optional then -%>
+                               <th class="cbi-section-table-cell">
+                               <%- if k.titleref then -%><a title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=k.titleref%>"><%- end -%>
+                                       <%-=k.title-%>
+                               <%- if k.titleref then -%></a><%- end -%>
+                               </th>
+                       <%- count = count + 1; end; end; if self.extedit or self.addremove then -%>
+                               <th class="cbi-section-table-cell">&#160;</th>
+                       <%- count = count + 1; end -%>
+                       </tr>
+                       <tr class="cbi-section-table-descr">
+                       <%- if not self.anonymous then -%>
+                               <%- if self.sectiondesc then -%>
+                                       <th class="cbi-section-table-cell"><%=self.sectiondesc%></th>
+                               <%- else -%>
+                                       <th></th>
+                               <%- end -%>
+                       <%- end -%>
+                       <%- for i, k in pairs(self.children) do if not k.optional then -%>
+                               <th class="cbi-section-table-cell"><%=k.description%></th>
+                       <%- end; end; if self.extedit or self.addremove then -%>
+                               <th class="cbi-section-table-cell"></th>
+                       <%- end -%>
+                       </tr>
+                       <%- local isempty = true
+                           for i, k in ipairs(self:cfgsections()) do
+                                       section = k
+                                       isempty = false
+                                       scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" }
+                       -%>
+                       <tr class="cbi-section-table-row<% if self.extedit or self.rowcolors then %> cbi-rowstyle-<%=rowstyle()%><% end %>" id="cbi-<%=self.config%>-<%=section%>">
+                               <% if not self.anonymous then -%>
+                                       <th><h3><%=k%></h3></th>
+                               <%- end %>
+
+                               <%-     for k, node in ipairs(self.children) do -%>
+                                       <%-    if not node.optional then -%>
+                                              <%- nodevalue = node:cfgvalue(section) -%>
+                                              <%- if nodevalue and ( nodevalue ~= "" ) and string.find(nodevalue, 'http://', 1, plain) then
+                                                      node.href = nodevalue
+                                                      node.template = "diag/smapvalue"
+                                                   end 
+                                               -%>
+                                              <%- node:render(section, scope or {}) -%>
+                                       <%- end -%>
+                                <%- end -%>
+
+                               <%- if self.extedit or self.addremove then -%>
+                                       <td class="cbi-section-table-cell">
+                                               <%- if self.extedit then -%>
+                                                       <a href="
+                                                       <%- if type(self.extedit) == "string" then -%>
+                                                               <%=self.extedit:format(section)%>
+                                                       <%- elseif type(self.extedit) == "function" then -%>
+                                                               <%=self:extedit(section)%>
+                                                       <%- end -%>
+                                                       " title="<%:edit%>"><img style="border: none" src="<%=resource%>/cbi/edit.gif" alt="<%:edit%>" /></a>
+                                               <%- end; if self.addremove then %>
+                                                       <input type="image" value="<%:cbi_del%>" name="cbi.rts.<%=self.config%>.<%=k%>" alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" />
+                                               <%- end -%>
+                                       </td>
+                               <%- end -%>
+                       </tr>
+                       <%- end -%>
+
+                       <%- if isempty then -%>
+                       <tr class="cbi-section-table-row">
+                               <td colspan="<%=count%>"><em><br /><%:sectempty%></em></td>
+                       </tr>
+                       <%- end -%>
+               </table>
+
+               <% if self.error then %>
+                       <div class="cbi-section-error">
+                               <ul><% for _, c in pairs(self.error) do for _, e in ipairs(c) do -%>
+                                       <li><%=luci.util.pcdata(e):gsub("\n","<br />")%></li>
+                               <%- end end %></ul>
+                       </div>
+               <% end %>
+
+               <%- if self.addremove then -%>
+                       <% if self.template_addremove then include(self.template_addremove) else -%>
+                       <div class="cbi-section-create cbi-smapsection-create">
+                               <% if self.anonymous then %>
+                                       <input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" title="<%:cbi_add%>" />
+                               <% else %>
+                                       <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
+                                       <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
+                                       <input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" title="<%:cbi_add%>" />
+                                       <% if self.invalid_cts then -%>
+                                               <br /><%:cbi_invalid%></div>
+                                       <%- end %>
+                               <% end %>
+                       </div>
+                       <%- end %>
+               <%- end -%>
+       </div>
+</fieldset>
+<!-- /smapsection -->
diff --git a/applications/luci-diag-devinfo/luasrc/view/diag/smapvalue.htm b/applications/luci-diag-devinfo/luasrc/view/diag/smapvalue.htm
new file mode 100644 (file)
index 0000000..60aa70a
--- /dev/null
@@ -0,0 +1,21 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+
+<%+cbi/valueheader%>
+<% if self.href then %><a href="<%=self.href%>" target="_blank"><% end -%>
+       <%=luci.util.pcdata(self:cfgvalue(section))%>
+<%- if self.href then %></a><%end%>
+&#160;
+<input type="hidden" id="<%=cbid%>" value="<%=luci.util.pcdata(self:cfgvalue(section))%>" />
+<%+cbi/valuefooter%>
diff --git a/applications/luci-diag-devinfo/root/etc/config/luci_devinfo b/applications/luci-diag-devinfo/root/etc/config/luci_devinfo
new file mode 100644 (file)
index 0000000..1bcdc19
--- /dev/null
@@ -0,0 +1,20 @@
+config 'smap_scannet' 'SIP_LAN'
+        option 'enable' '0'
+       option 'interface' 'lan'
+       option 'subnet' '192.168.99.0/24'
+       
+config 'smap_scannet' 'SIP_WAN'
+        option 'enable' '0'
+       option 'interface' 'wan'
+       option 'subnet' '216.218.0.0/16'
+
+config 'netdiscover_scannet' 'SCAN_LAN'
+        option 'enable' '0'
+       option 'interface' 'lan'
+       option 'subnet' '192.168.99.0/24'
+       
+config 'netdiscover_scannet' 'SCAN_WAN'
+        option 'enable' '0'
+       option 'interface' 'wan'
+       option 'subnet' '216.218.0.0/16'
+
diff --git a/applications/luci-diag-devinfo/root/lib/uci/schema/default/luci_devinfo b/applications/luci-diag-devinfo/root/lib/uci/schema/default/luci_devinfo
new file mode 100644 (file)
index 0000000..db63d1e
--- /dev/null
@@ -0,0 +1,109 @@
+package luci_devinfo
+
+config package
+       option title 'Device Info Scanning Configuration'
+
+config section
+       option name     'smap_scannet'
+       option title    'SMAP scanning network configuration'
+       option package  'luci_devinfo'
+       option named    'true'
+       option required 'true'
+
+config variable
+       option name     'subnet'
+       option title    'Subnet to scan'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype 'ip4addr'
+       option required 'true'
+
+config variable
+       option name     'ports'
+       option title    'Ports to scan'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype  'string'
+
+config variable
+       option name     'enable'
+       option title    'Enable'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype  'boolean'
+       option required  'true'
+
+config variable
+       option name     'timeout'
+       option title    'Seconds to wait for responses to scan'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype 'uint'
+       option required 'false'
+
+config variable
+       option name     'interface'
+       option title    'Interface'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype 'string'
+       option required 'true'
+
+config variable
+       option name     'repeat_count'
+       option title    'Repeat Count'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype 'uint'
+       option required  'false'
+
+config variable
+       option name     'sleepreq'
+       option title    'Sleep between requests'
+       option section  'luci_devinfo.smap_scannet'
+       option datatype 'uint'
+       option required  'false'
+
+config section
+       option name     'netdiscover_scannet'
+       option title    'Network scanning configuration'
+       option package  'luci_devinfo'
+       option named    true
+       option required true
+
+config variable
+       option name     'subnet'
+       option title    'Subnet to scan'
+       option section  'luci_devinfo.netdiscover_scannet'
+       option datatype 'ip4addr'
+       option required 'true'
+
+config variable
+       option name     'interface'
+       option title    'Interface to use for scan'
+       option section  'luci_devinfo.netdiscover_scannet'
+       option datatype 'string'
+       option required 'true'
+
+config variable
+       option name     'enable'
+       option title    'Enable'
+       option section  'luci_devinfo.netdiscover_scannet'
+       option datatype  'boolean'
+       option required 'true'
+
+config variable
+       option name     'timeout'
+       option title    'Seconds to wait for responses to scan'
+       option section  'luci_devinfo.netdiscover_scannet'
+       option datatype 'uint'
+       option required 'false'
+
+config variable
+       option name     'repeat_count'
+       option title    'Repeat Count'
+       option section  'luci_devinfo.netdiscover_scannet'
+       option datatype 'uint'
+       option required  'false'
+
+config variable
+       option name     'sleepreq'
+       option title    'Sleep between requests'
+       option section  'luci_devinfo.netdiscover_scannet'
+       option datatype 'uint'
+       option required  'false'
+
diff --git a/applications/luci-diag-devinfo/root/lib/uci/schema/default/mactodevinfo b/applications/luci-diag-devinfo/root/lib/uci/schema/default/mactodevinfo
new file mode 100644 (file)
index 0000000..f846e00
--- /dev/null
@@ -0,0 +1,57 @@
+package luci-devinfo
+
+config package
+       option title 'MAC Device Info Overrides'
+
+config section
+       option name     'mactodevinfo'
+       option title    'MAC Device Info Override'
+       option package  'mactodevinfo'
+       option named    'false'
+       option required 'false'
+
+config variable
+       option name     'name'
+       option title    'Name for Device'
+       option section  'mactodevinfo.name'
+       option datatype 'string'
+
+config variable
+       option name     'maclow'
+       option title    'Beginning of MAC address range'
+       option section  'mactodevinfo.maclow'
+       option datatype 'macaddr'
+       option required 'true'
+
+config variable
+       option name     'machigh'
+       option title    'End of MAC address range'
+       option section  'mactodevinfo.machigh'
+       option datatype 'macaddr'
+       option required 'true'
+
+config variable
+       option name     'vendor'
+       option title    'Vendor'
+       option section  'mactodevinfo.vendor'
+       option datatype  'string'
+
+config variable
+       option name     'devtype'
+       option title    'Device Type'
+       option section  'mactodevinfo.devtype'
+       option datatype  'string'
+       option required  'true'
+
+config variable
+       option name     'model'
+       option title    'Device Type'
+       option section  'mactodevinfo.model'
+       option datatype  'string'
+       option required 'true'
+
+config variable
+       option name     'ouiowneroverride'
+       option title    'OUI Owner Override'
+       option section  'mactodevinfo.ouiowneroverride'
+       option datatype  'string'
diff --git a/applications/luci-voice-core/Makefile b/applications/luci-voice-core/Makefile
new file mode 100644 (file)
index 0000000..d57c456
--- /dev/null
@@ -0,0 +1,4 @@
+PO=voice_core
+
+include ../../build/config.mk
+include ../../build/module.mk
diff --git a/applications/luci-voice-core/luasrc/controller/luci_voice.lua b/applications/luci-voice-core/luasrc/controller/luci_voice.lua
new file mode 100644 (file)
index 0000000..4d8873e
--- /dev/null
@@ -0,0 +1,37 @@
+--[[
+
+Luci Voice Core
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+
+module("luci.controller.luci_voice", package.seeall)
+
+function index()
+   require("luci.i18n")
+   luci.i18n.loadc("voice_core")
+
+   local e = entry({"admin", "voice"}, template("luci_voice/index") , luci.i18n.translate("l_v_adminvoice", "Voice"), 90)
+   e.index = true
+   e.i18n = "voice_core"
+
+   e = entry({"mini", "voice"}, template("luci_voice/index"), luci.i18n.translate("l_v_minivoice", "Voice"), 90)
+   e.index = true
+   e.i18n = "voice_core"
+
+   e = entry({"mini", "voice", "phones"}, template("luci_voice/phone_index"), luci.i18n.translate("l_v_miniphones"), 90)
+   e.index = true
+   e.i18n = "voice_core"
+
+   e = entry({"admin", "voice", "phones"}, template("luci_voice/phone_index"), luci.i18n.translate("l_v_adminphones"), 90)
+   e.index = true
+   e.i18n = "voice_core"
+
+end
diff --git a/applications/luci-voice-core/luasrc/view/luci_voice/index.htm b/applications/luci-voice-core/luasrc/view/luci_voice/index.htm
new file mode 100644 (file)
index 0000000..73d2ce4
--- /dev/null
@@ -0,0 +1,24 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+<%+header%>
+<h2><a id="content" name="content">Voice</a></h2>
+<p>Here you can control OpenWRT voice-related settings and see
+  voice-related information from OpenWRT</p>
+<p>In particular Asterisk configuration and information is displayed
+  here, as well as diagnostics that specifically apply to voice but are
+  not general networking diagnostics (e.g. includes SIP device scans, but not
+  ping tests).  Includes PSTN phones as well as VoIP and possibly
+  non-telephony related options.
+</p>
+<%+footer%>
diff --git a/applications/luci-voice-core/luasrc/view/luci_voice/phone_index.htm b/applications/luci-voice-core/luasrc/view/luci_voice/phone_index.htm
new file mode 100644 (file)
index 0000000..89b8661
--- /dev/null
@@ -0,0 +1,20 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+<%+header%>
+<h2><a id="content" name="content">Phones</a></h2>
+<p>Here you can control phone configuration and information in OpenWRT</p>
+<p>You can control the setup of phone clients and servers and see
+  information such as diagnostics related to phone devices from this menu.
+</p>
+<%+footer%>
diff --git a/applications/luci-voice-diag/Makefile b/applications/luci-voice-diag/Makefile
new file mode 100644 (file)
index 0000000..b764ed4
--- /dev/null
@@ -0,0 +1,4 @@
+PO=voice_diag
+
+include ../../build/config.mk
+include ../../build/module.mk
diff --git a/applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua b/applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua
new file mode 100644 (file)
index 0000000..e0dccb0
--- /dev/null
@@ -0,0 +1,25 @@
+--[[
+
+Luci Voice Core
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+]]--
+
+
+module("luci.controller.luci_voice.luci_voice_diag", package.seeall)
+
+function index()
+   require("luci.i18n")
+   luci.i18n.loadc("voice_diag")
+
+   local e = entry({"admin", "voice", "diag"}, template("luci_voice/diag_index") , luci.i18n.translate("l_v_d_admindiag"), 90)
+   e.index = true
+   e.i18n = "voice_diag"
+   e.dependent = true
+end
diff --git a/applications/luci-voice-diag/luasrc/view/luci_voice/diag_index.htm b/applications/luci-voice-diag/luasrc/view/luci_voice/diag_index.htm
new file mode 100644 (file)
index 0000000..010eaf7
--- /dev/null
@@ -0,0 +1,18 @@
+<%#
+LuCI - Lua Configuration Interface
+(c) 2009 Daniel Dickinson
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+-%>
+<%+header%>
+<h2><a id="content" name="content"><%:l_v_d_di_voicediag%></a></h2>
+<p><%:l_v_d_di_voicediag1%></p>
+<p><%:l_v_d_di_voicediag2%></p>
+<%+footer%>
index 361bff9b2d4b6db41bf5905bedf65813a20cd026..69263e78b255d1b32623df3ed2acf53f48d8669f 100644 (file)
@@ -520,6 +520,49 @@ define Package/luci-app-statistics/install
        $(call Package/luci/install/template,$(1),applications/luci-statistics)
 endef
 
+define Package/luci-app-diag-core
+  $(call Package/luci/webtemplate)
+  DEPENDS+=+luci-admin-core 
+  TITLE:=LuCI Diagnostics Tools (Core)
+endef
+
+define Package/luci-app-diag-devinfo
+  $(call Package/luci/webtemplate)
+  DEPENDS+=+luci-app-diag-core +smap +netdiscover +mac-to-devinfo +httping +smap-to-devinfo +netdiscover-to-devinfo
+  TITLE:=LuCI Diagnostics Tools (Device Info)
+endef
+
+define Package/luci-app-voice-core
+  $(call Package/luci/webtemplate)
+  DEPENDS+=+luci-admin-core 
+  TITLE:=LuCI Voice Software (Core)
+endef
+
+define Package/luci-app-voice-diag
+  $(call Package/luci/webtemplate)
+  DEPENDS+=+luci-app-voice-core +luci-app-diag-devinfo
+  TITLE:=LuCI Voice Software (Diagnostics)
+endef
+
+define Package/luci-app-diag-devinfo/conffiles
+/etc/config/luci_devinfo
+endef
+
+define Package/luci-app-diag-core/install
+       $(call Package/luci/install/template,$(1),applications/luci-diag-core)
+endef
+
+define Package/luci-app-diag-devinfo/install
+       $(call Package/luci/install/template,$(1),applications/luci-diag-devinfo)
+endef
+
+define Package/luci-app-voice-core/install
+       $(call Package/luci/install/template,$(1),applications/luci-voice-core)
+endef
+
+define Package/luci-app-voice-diag/install
+       $(call Package/luci/install/template,$(1),applications/luci-voice-diag)
+endef
 
 define Package/luci-app-upnp
   $(call Package/luci/webtemplate)
@@ -978,6 +1021,18 @@ endif
 ifneq ($(CONFIG_PACKAGE_luci-app-statistics),)
        PKG_SELECTED_MODULES+=applications/luci-statistics
 endif
+ifneq ($(CONFIG_PACKAGE_luci-app-voice-core),)
+       PKG_SELECTED_MODULES+=applications/luci-voice-core
+endif
+ifneq ($(CONFIG_PACKAGE_luci-app-voice-diag),)
+       PKG_SELECTED_MODULES+=applications/luci-voice-diag
+endif
+ifneq ($(CONFIG_PACKAGE_luci-app-diag-core),)
+       PKG_SELECTED_MODULES+=applications/luci-diag-core
+endif
+ifneq ($(CONFIG_PACKAGE_luci-app-diag-devinfo),)
+       PKG_SELECTED_MODULES+=applications/luci-diag-devinfo
+endif
 ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
        PKG_SELECTED_MODULES+=applications/luci-upnp
 endif
@@ -1133,6 +1188,10 @@ $(eval $(call BuildPackage,luci-app-olsr))
 $(eval $(call BuildPackage,luci-app-qos))
 $(eval $(call BuildPackage,luci-app-splash))
 $(eval $(call BuildPackage,luci-app-statistics))
+$(eval $(call BuildPackage,luci-app-diag-core))
+$(eval $(call BuildPackage,luci-app-diag-devinfo))
+$(eval $(call BuildPackage,luci-app-voice-core))
+$(eval $(call BuildPackage,luci-app-voice-diag))
 $(eval $(call BuildPackage,luci-app-upnp))
 $(eval $(call BuildPackage,luci-app-ntpc))
 $(eval $(call BuildPackage,luci-app-ddns))
diff --git a/po/en/diag_core.po b/po/en/diag_core.po
new file mode 100644 (file)
index 0000000..d8e1943
--- /dev/null
@@ -0,0 +1,46 @@
+# Diagnostics Core.
+# Copyright (C) 2009 Daniel Dickinson.
+# Daniel Dickinson <crazycshore@gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: diag-core 0.1\n"
+"PO-Revision-Date: 2009-07-17 04:54-0400\n"
+"Last-Translator: Daniel Dickinson <crazycshore@gmail.com>\n"
+"Language-Team: en <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "l_d_c_nci_diag"
+msgstr "Diagnostics"
+
+msgid "l_d_c_nci_diag1"
+msgstr ""
+"With this menu you can configure network diagnostics, such as network device "
+"scans and ping tests."
+
+msgid "l_d_c_nci_diag2"
+msgstr ""
+"The diagnostics available under this menu depend on what modules you have "
+"installed on your device."
+
+msgid "l_d_c_i_diag"
+msgstr "Diagnostics"
+
+msgid "l_d_c_i_diag1"
+msgstr ""
+"The entries in the menu allow you to perform diagnostic tests on your system "
+"to aid in troubleshooting."
+
+msgid "l_d_c_i_diag2"
+msgstr ""
+"The diagnostics available under this menu depend on what modules you have "
+"installed on your device."
+
+msgid "l_d_diag_config"
+msgstr "Configure Diagnostics"
+
+msgid "l_d_diag"
+msgstr "Diagnostics"
diff --git a/po/en/diag_devinfo.po b/po/en/diag_devinfo.po
new file mode 100644 (file)
index 0000000..231c7dc
--- /dev/null
@@ -0,0 +1,302 @@
+# Diagnostics (Device Info).
+# Copyright (C) 2009 Daniel Dickinson
+# Daniel Dickinson <crazycshore@gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: 2009-07-17 04:22-0400\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "cbi_gorel"
+msgstr " "
+
+msgid "edit"
+msgstr "Edit"
+
+msgid "cbi_del"
+msgstr "Delete"
+
+msgid "sectempty"
+msgstr " "
+
+msgid "cbi_add"
+msgstr "Add"
+
+msgid "cbi_invalid"
+msgstr "Invalid"
+
+msgid "l_d_d_dc_nosipdev"
+msgstr "No SIP devices"
+
+msgid "l_d_d_dc_nodev"
+msgstr "No devices detected"
+
+msgid "l_d_d_dc_checkothernet"
+msgstr "check other networks"
+
+msgid "l_d_d_dc_sipdev_found_mini"
+msgstr "SIP devices discovered for"
+
+msgid "l_d_d_dc_sipdev_found_admin"
+msgstr "SIP devices discovered for"
+
+msgid "l_dd_dc_netdev_found_mini"
+msgstr "Devices discovered for"
+
+#. Devices discovered for
+msgid "l_d_d_dc_netdev_found_admin"
+msgstr "Devices discovered for"
+
+msgid "l_d_d_dc_mac_ip"
+msgstr "IP Address"
+
+msgid "l_d_d_dc_mac_address"
+msgstr "MAC Address"
+
+msgid "l_d_d_dc_mac_vendor"
+msgstr "Vendor"
+
+msgid "l_d_d_dc_mac_device_type"
+msgstr "Device Type"
+
+msgid "l_d_d_dc_mac_model"
+msgstr "Model"
+
+msgid "l_d_d_dc_config_page"
+msgstr "Link to Device"
+
+msgid "l_d_d_dc_raw"
+msgstr "Raw"
+
+msgid "l_d_d_dc_enable"
+msgstr "Enable"
+
+msgid "l_d_d_dc_interface"
+msgstr "Interface"
+
+msgid "l_d_d_dc_subnet"
+msgstr "Subnet"
+
+msgid "l_d_d_dc_timeout"
+msgstr "Timeout"
+
+msgid "l_d_d_dc_timeout_descr"
+msgstr "Time to wait for responses in seconds (default 10)"
+
+msgid "l_d_d_dc_repeat_count"
+msgstr "Repeat Count"
+
+msgid "l_d_d_dc_repeat_count_descr"
+msgstr "Number of times to send requests (default 1)"
+
+msgid "l_d_d_dc_sleep"
+msgstr "Sleep Between Requests"
+
+msgid "l_d_d_dc_sleep_desc"
+msgstr "Milliseconds to sleep between requests (default 100)"
+
+msgid "l_d_d_nc_netdiscover_actions"
+msgstr "Actions"
+
+msgid "l_d_d_nc_config_scan"
+msgstr "Configure Scans"
+
+msgid "l_d_d_nc_redo_scans"
+msgstr "Repeat Scans (this can take a few minutes)"
+
+msgid "l_d_d_ldd_diag_smap_devinfo"
+msgstr "Phones"
+
+msgid "l_d_d_ldd_config"
+msgstr "Configure"
+
+msgid "l_d_d_ldd_smap_devinfo_config"
+msgstr "SIP Devices on Network"
+
+msgid "l_d_d_ldd_netdiscover_devinfo_scan"
+msgstr "Network Device Scan"
+
+msgid "l_d_d_ldd_smap_devinfo_scan_config"
+msgstr "SIP Device Scan"
+
+msgid "l_d_d_ldd_netdiscover_devinfo"
+msgstr "Devices on Network"
+
+msgid "l_d_d_ldd_mac_to_devinfo_overrides"
+msgstr "MAC Device Info Overrides"
+
+msgid "l_d_d_ldd_diag_smap_devinfo_scan_mini"
+msgstr "Phone Scan"
+
+msgid "l_d_d_ldd_smap_devinfo_config_scan_miini"
+msgstr "Config Phone Scan"
+
+msgid "l_d_d_ldd_diag_netdiscover_devinfo_scan_mini"
+msgstr "Network Device Scan"
+
+msgid "l_d_d_ldd_netdiscover_devinfo_scan_config_mini"
+msgstr "Device Scan Config"
+
+msgid "l_d_d_sc_smap_actions"
+msgstr "Actions"
+
+msgid "l_d_d_sc_config_scan"
+msgstr "Configure Scans"
+
+msgid "l_d_d_sc_redo_scans"
+msgstr "Repeat Scans (this can take a few minutes)"
+
+msgid "l_d_d_ndc_netdiscover_to_devinfo_config"
+msgstr "Network Device Scanning Configuration"
+
+msgid "l_d_d_ndc_netdiscover_to_devinfo_config_descr"
+msgstr ""
+"Configure scanning for devices on specified networks. Decreasing 'Timeout', "
+"'Repeat Count', and/or 'Sleep Between Requests' may speed up scans, but also "
+"may fail to find some devices."
+
+msgid "l_d_d_ndc_use_config"
+msgstr "Use Configuration"
+
+msgid "l_d_d_ndc_do_scans"
+msgstr "Perform Scans (this can take a few minutes)"
+
+msgid "l_d_d_ndc_netdiscover_scannet"
+msgstr "Scanning Configuration"
+
+msgid "l_d_d_ndc_netdiscover_scannet_descr"
+msgstr "Networks to scan for devices"
+
+msgid "l_d_d_sdc_smap_to_devinfo_config"
+msgstr "SIP Device Scanning Configuration"
+
+msgid "l_d_d_sdc_smap_to_devinfo_config_descr"
+msgstr ""
+"Configure scanning for supported SIP devices on specified networks. "
+"Decreasing 'Timeout', 'Repeat Count', and/or 'Sleep Between Requests' may "
+"speed up scans, but also may fail to find some devices."
+
+msgid "l_d_d_sdc_use_config"
+msgstr "Use Configuration"
+
+msgid "l_d_d_sdc_do_scans"
+msgstr "Perform Scans (this can take a few minutes)"
+
+msgid "l_d_d_sdc_smap_scannet"
+msgstr "Scanning Configuration"
+
+msgid "smap_scannet_descr"
+msgstr "Networks to scan for supported devices"
+
+msgid "l_d_d_sdc_ports"
+msgstr "Ports"
+
+msgid "l_d_d_ndc_netdiscover_to_devinfo_config_mini"
+msgstr "Network Device Scanning Configuration"
+
+msgid "l_d_d_ndc_mini_netdiscover_to_devinfo_config_descr"
+msgstr ""
+"Configure scanning for devices on specified networks. Decreasing 'Timeout', "
+"'Repeat Count', and/or 'Sleep Between Requests' may speed up scans, but also "
+"may fail to find some devices."
+
+msgid "l_d_d_ndc_mini_use_config"
+msgstr "Use Configuration"
+
+msgid "l_d_d_ndc_mini_do_scans"
+msgstr "Perform Scans (this can take a few minutes)"
+
+msgid "l_d_d_ndc_mini_netdiscover_scannet"
+msgstr "Scanning Configuration"
+
+msgid "l_d_d_ndc_mini_netdiscover_scannet_descr"
+msgstr "Networks to scan for devices"
+
+msgid "l_d_d_sd_smap_to_devinfo"
+msgstr "SIP Device Information"
+
+msgid "l_d_d_sd_smap_to_devinfo_descr"
+msgstr "Scan for supported SIP devices on specified networks."
+
+msgid "l_d_d_sd_mini_smap_to_devinfo"
+msgstr "Phone Information"
+
+msgid "l_d_d_sd_mini_smap_to_devinfo_descr"
+msgstr "Scan for supported SIP devices on specified networks."
+
+msgid "l_d_d_m_mac_to_devinfo_override"
+msgstr "MAC Device Info Overrides"
+
+msgid "l_d_d_m_mac_to_devinfo_override_descr"
+msgstr ""
+"Override the information returned by the MAC to Device Info Script (mac-to-"
+"devinfo) for a specified range of MAC Addresses"
+
+msgid "l_d_d_m_mac_to_devinfo_section"
+msgstr "MAC Device Override"
+
+msgid "l_d_d_m_mac_to_devinfo_section_descr"
+msgstr "MAC range and information used to override system and IEEE databases"
+
+msgid "l_d_d_m_name"
+msgstr "Name"
+
+msgid "l_d_d_m_maclow"
+msgstr "Beginning of MAC address range"
+
+msgid "l_d_d_m_machigh"
+msgstr "End of MAC address range"
+
+msgid "l_d_d_m_vendor"
+msgstr "Vendor"
+
+msgid "l_d_d_m_mactodevinfo_devtype"
+msgstr "Device Type"
+
+msgid "l_d_d_m_model"
+msgstr "Model"
+
+msgid "l_d_d_m_ouiowneroverride"
+msgstr "OUI Owner"
+
+msgid "l_d_d_nd_mini_netdiscover_to_devinfo"
+msgstr "Network Device Scan"
+
+msgid "l_d_d_nd_mini_netdiscover_to_devinfo_descr"
+msgstr "Scan for devices on specified networks."
+
+msgid "l_d_d_sdc_mini_smap_to_devinfo_config"
+msgstr "Phone Scanning Configuration"
+
+msgid "l_d_d_sdc_mini_smap_to_devinfo_config_descr"
+msgstr ""
+"Configure scanning for supported SIP devices on specified networks. "
+"Decreasing 'Timeout', 'Repeat Count', and/or 'Sleep Between Requests' may "
+"speed up scans, but also may fail to find some devices."
+
+msgid "l_d_d_sdc_mini_use_config"
+msgstr "Use Configuration"
+
+msgid "l_d_d_sdc_mini_do_scans"
+msgstr "Perform Scans (this can take a few minutes)"
+
+msgid "l_d_d_sdc_mini_smap_scannet"
+msgstr "Scanning Configuration"
+
+msgid "l_d_d_sdc_mini_smap_scannet_descr"
+msgstr "Networks to scan for supported devices"
+
+msgid "l_d_d_sdc_mini_ports"
+msgstr "Ports"
+
+msgid "l_d_d_nd_netdiscover_to_devinfo"
+msgstr "Network Device Scan"
+
+msgid "l_d_d_nd_netdiscover_to_devinfo_descr"
+msgstr "Scans for devices on specified networks."
diff --git a/po/en/voice_core.po b/po/en/voice_core.po
new file mode 100644 (file)
index 0000000..9da4b41
--- /dev/null
@@ -0,0 +1,28 @@
+# Voice Core.
+# Copyright (C) 2009 Daniel Dickinson
+# Daniel Dickinson <crazycshore@gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: 2009-07-16 22:19-0400\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Voice
+msgid "l_v_adminvoice"
+msgstr "Voice"
+
+#. Voice
+msgid "l_v_minivoice"
+msgstr "Voice"
+
+msgid "l_v_miniphones"
+msgstr "Phones"
+
+msgid "l_v_adminphones"
+msgstr "Phones"
diff --git a/po/en/voice_diag.po b/po/en/voice_diag.po
new file mode 100644 (file)
index 0000000..d14aee5
--- /dev/null
@@ -0,0 +1,30 @@
+# Voice Diagnostics.
+# Copyright (C) 2009 Daniel Dickinson
+# Daniel Dickinson <crazycshore@gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"PO-Revision-Date: 2009-07-16 22:26-0400\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "l_v_d_di_voicediag"
+msgstr "Diagnostics"
+
+msgid "l_v_d_di_voicediag1"
+msgstr ""
+"Under this menu are options that allow you to configure and perform tests on "
+"the voice operations of your system.  These are known as diagnostics."
+
+msgid "l_v_d_di_voicediag2"
+msgstr ""
+"The diagnostics available on your device depend on the modules that you have "
+"installed."
+
+msgid "l_v_d_admindiag"
+msgstr "Diagnostics"
diff --git a/po/templates/diag_core.pot b/po/templates/diag_core.pot
new file mode 100644 (file)
index 0000000..520afec
--- /dev/null
@@ -0,0 +1,24 @@
+msgid "l_d_c_nci_diag"
+msgstr ""
+
+msgid "l_d_c_nci_diag1"
+msgstr ""
+
+msgid "l_d_c_nci_diag2"
+msgstr ""
+
+msgid "l_d_c_i_diag"
+msgstr ""
+
+msgid "l_d_c_i_diag1"
+msgstr ""
+
+msgid "l_d_c_i_diag2"
+msgstr ""
+
+msgid "l_d_diag_config"
+msgstr ""
+
+msgid "l_d_diag"
+msgstr ""
+
diff --git a/po/templates/diag_devinfo.pot b/po/templates/diag_devinfo.pot
new file mode 100644 (file)
index 0000000..3874869
--- /dev/null
@@ -0,0 +1,274 @@
+msgid "cbi_gorel"
+msgstr ""
+
+msgid "edit"
+msgstr ""
+
+msgid "cbi_del"
+msgstr ""
+
+msgid "sectempty"
+msgstr ""
+
+msgid "cbi_add"
+msgstr ""
+
+msgid "cbi_invalid"
+msgstr ""
+
+msgid "l_d_d_dc_nosipdev"
+msgstr ""
+
+msgid "l_d_d_dc_nodev"
+msgstr ""
+
+msgid "l_d_d_dc_checkothernet"
+msgstr ""
+
+msgid "l_d_d_dc_sipdev_found_mini"
+msgstr ""
+
+msgid "l_d_d_dc_sipdev_found_admin"
+msgstr ""
+
+msgid "l_dd_dc_netdev_found_mini"
+msgstr ""
+
+#. Devices discovered for
+msgid "l_d_d_dc_netdev_found_admin"
+msgstr "Devices discovered for"
+
+msgid "l_d_d_dc_mac_ip"
+msgstr ""
+
+msgid "l_d_d_dc_mac_address"
+msgstr ""
+
+msgid "l_d_d_dc_mac_vendor"
+msgstr ""
+
+msgid "l_d_d_dc_mac_device_type"
+msgstr ""
+
+msgid "l_d_d_dc_mac_model"
+msgstr ""
+
+msgid "l_d_d_dc_config_page"
+msgstr ""
+
+msgid "l_d_d_dc_raw"
+msgstr ""
+
+msgid "l_d_d_dc_enable"
+msgstr ""
+
+msgid "l_d_d_dc_interface"
+msgstr ""
+
+msgid "l_d_d_dc_subnet"
+msgstr ""
+
+msgid "l_d_d_dc_timeout"
+msgstr ""
+
+msgid "l_d_d_dc_timeout_descr"
+msgstr ""
+
+msgid "l_d_d_dc_repeat_count"
+msgstr ""
+
+msgid "l_d_d_dc_repeat_count_descr"
+msgstr ""
+
+msgid "l_d_d_dc_sleep"
+msgstr ""
+
+msgid "l_d_d_dc_sleep_desc"
+msgstr ""
+
+msgid "l_d_d_nc_netdiscover_actions"
+msgstr ""
+
+msgid "l_d_d_nc_config_scan"
+msgstr ""
+
+msgid "l_d_d_nc_redo_scans"
+msgstr ""
+
+msgid "l_d_d_ldd_diag_smap_devinfo"
+msgstr ""
+
+msgid "l_d_d_ldd_config"
+msgstr ""
+
+msgid "l_d_d_ldd_smap_devinfo_config"
+msgstr ""
+
+msgid "l_d_d_ldd_netdiscover_devinfo_scan"
+msgstr ""
+
+msgid "l_d_d_ldd_smap_devinfo_scan_config"
+msgstr ""
+
+msgid "l_d_d_ldd_netdiscover_devinfo"
+msgstr ""
+
+msgid "l_d_d_ldd_mac_to_devinfo_overrides"
+msgstr ""
+
+msgid "l_d_d_ldd_diag_smap_devinfo_scan_mini"
+msgstr ""
+
+msgid "l_d_d_ldd_smap_devinfo_config_scan_miini"
+msgstr ""
+
+msgid "l_d_d_ldd_diag_netdiscover_devinfo_scan_mini"
+msgstr ""
+
+msgid "l_d_d_ldd_netdiscover_devinfo_scan_config_mini"
+msgstr ""
+
+msgid "l_d_d_sc_smap_actions"
+msgstr ""
+
+msgid "l_d_d_sc_config_scan"
+msgstr ""
+
+msgid "l_d_d_sc_redo_scans"
+msgstr ""
+
+msgid "l_d_d_ndc_netdiscover_to_devinfo_config"
+msgstr ""
+
+msgid "l_d_d_ndc_netdiscover_to_devinfo_config_descr"
+msgstr ""
+
+msgid "l_d_d_ndc_use_config"
+msgstr ""
+
+msgid "l_d_d_ndc_do_scans"
+msgstr ""
+
+msgid "l_d_d_ndc_netdiscover_scannet"
+msgstr ""
+
+msgid "l_d_d_ndc_netdiscover_scannet_descr"
+msgstr ""
+
+msgid "l_d_d_sdc_smap_to_devinfo_config"
+msgstr ""
+
+msgid "l_d_d_sdc_smap_to_devinfo_config_descr"
+msgstr ""
+
+msgid "l_d_d_sdc_use_config"
+msgstr ""
+
+msgid "l_d_d_sdc_do_scans"
+msgstr ""
+
+msgid "l_d_d_sdc_smap_scannet"
+msgstr ""
+
+msgid "smap_scannet_descr"
+msgstr ""
+
+msgid "l_d_d_sdc_ports"
+msgstr ""
+
+msgid "l_d_d_ndc_netdiscover_to_devinfo_config_mini"
+msgstr ""
+
+msgid "l_d_d_ndc_mini_netdiscover_to_devinfo_config_descr"
+msgstr ""
+
+msgid "l_d_d_ndc_mini_use_config"
+msgstr ""
+
+msgid "l_d_d_ndc_mini_do_scans"
+msgstr ""
+
+msgid "l_d_d_ndc_mini_netdiscover_scannet"
+msgstr ""
+
+msgid "l_d_d_ndc_mini_netdiscover_scannet_descr"
+msgstr ""
+
+msgid "l_d_d_sd_smap_to_devinfo"
+msgstr ""
+
+msgid "l_d_d_sd_smap_to_devinfo_descr"
+msgstr ""
+
+msgid "l_d_d_sd_mini_smap_to_devinfo"
+msgstr ""
+
+msgid "l_d_d_sd_mini_smap_to_devinfo_descr"
+msgstr ""
+
+msgid "l_d_d_m_mac_to_devinfo_override"
+msgstr ""
+
+msgid "l_d_d_m_mac_to_devinfo_override_descr"
+msgstr ""
+
+msgid "l_d_d_m_mac_to_devinfo_section"
+msgstr ""
+
+msgid "l_d_d_m_mac_to_devinfo_section_descr"
+msgstr ""
+
+msgid "l_d_d_m_name"
+msgstr ""
+
+msgid "l_d_d_m_maclow"
+msgstr ""
+
+msgid "l_d_d_m_machigh"
+msgstr ""
+
+msgid "l_d_d_m_vendor"
+msgstr ""
+
+msgid "l_d_d_m_mactodevinfo_devtype"
+msgstr ""
+
+msgid "l_d_d_m_model"
+msgstr ""
+
+msgid "l_d_d_m_ouiowneroverride"
+msgstr ""
+
+msgid "l_d_d_nd_mini_netdiscover_to_devinfo"
+msgstr ""
+
+msgid "l_d_d_nd_mini_netdiscover_to_devinfo_descr"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_smap_to_devinfo_config"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_smap_to_devinfo_config_descr"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_use_config"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_do_scans"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_smap_scannet"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_smap_scannet_descr"
+msgstr ""
+
+msgid "l_d_d_sdc_mini_ports"
+msgstr ""
+
+msgid "l_d_d_nd_netdiscover_to_devinfo"
+msgstr ""
+
+msgid "l_d_d_nd_netdiscover_to_devinfo_descr"
+msgstr ""
+
diff --git a/po/templates/voice_core.pot b/po/templates/voice_core.pot
new file mode 100644 (file)
index 0000000..6397624
--- /dev/null
@@ -0,0 +1,14 @@
+#. Voice
+msgid "l_v_adminvoice"
+msgstr "Voice"
+
+#. Voice
+msgid "l_v_minivoice"
+msgstr "Voice"
+
+msgid "l_v_miniphones"
+msgstr ""
+
+msgid "l_v_adminphones"
+msgstr ""
+
diff --git a/po/templates/voice_diag.pot b/po/templates/voice_diag.pot
new file mode 100644 (file)
index 0000000..243a4d6
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "l_v_d_di_voicediag"
+msgstr ""
+
+msgid "l_v_d_di_voicediag1"
+msgstr ""
+
+msgid "l_v_d_di_voicediag2"
+msgstr ""
+
+msgid "l_v_d_admindiag"
+msgstr ""
+