mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Remove unused functions from snmp.lua
This commit is contained in:
parent
fdf5a2d7e9
commit
82586d6327
1 changed files with 0 additions and 23 deletions
|
|
@ -386,29 +386,6 @@ function oid2str(oid)
|
|||
return table.concat(oid, '.')
|
||||
end
|
||||
|
||||
---
|
||||
-- Transforms a table representing an IP to a string.
|
||||
-- @param ip IP table.
|
||||
-- @return IP string.
|
||||
function ip2str(ip)
|
||||
if (type(ip) ~= "table") then return 'invalid ip' end
|
||||
return table.concat(ip, '.')
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- Transforms a string into an IP table.
|
||||
-- @param ipStr IP as string.
|
||||
-- @return Table representing IP.
|
||||
function str2ip(ipStr)
|
||||
local ip = {}
|
||||
for n in string.gmatch(ipStr, "%d+") do
|
||||
table.insert(ip, tonumber(n))
|
||||
end
|
||||
ip._snmp = '\x40'
|
||||
return ip
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- Fetches values from a SNMP response.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue