mirror of
https://github.com/nmap/nmap.git
synced 2025-12-17 21:19:01 +00:00
Remove unused and redundant snmp.dec function
This commit is contained in:
@@ -255,19 +255,6 @@ ASN1Decoder = {
|
|||||||
return pos, value
|
return pos, value
|
||||||
end,
|
end,
|
||||||
|
|
||||||
---
|
|
||||||
-- Decodes an SNMP packet or a part of it according to ASN.1 basic encoding
|
|
||||||
-- rules.
|
|
||||||
-- @param encStr Encoded string.
|
|
||||||
-- @param pos Current position in the string.
|
|
||||||
-- @return The decoded value(s).
|
|
||||||
dec = function(self, encStr, pos)
|
|
||||||
local result
|
|
||||||
local _
|
|
||||||
_, result = self:decode(encStr, pos)
|
|
||||||
return result
|
|
||||||
end,
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--- The encoder class
|
--- The encoder class
|
||||||
|
|||||||
@@ -136,19 +136,6 @@ function decode(encStr, pos)
|
|||||||
return decoder:decode( encStr, pos )
|
return decoder:decode( encStr, pos )
|
||||||
end
|
end
|
||||||
|
|
||||||
---
|
|
||||||
-- Decodes an SNMP packet or a part of it according to ASN.1 basic encoding
|
|
||||||
-- rules.
|
|
||||||
-- @param encStr Encoded string.
|
|
||||||
-- @param pos Current position in the string.
|
|
||||||
-- @return The decoded value(s).
|
|
||||||
function dec(encStr, pos)
|
|
||||||
local result
|
|
||||||
local _
|
|
||||||
_, result = decode(encStr, pos)
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Create an SNMP packet.
|
-- Create an SNMP packet.
|
||||||
-- @param PDU SNMP Protocol Data Unit to be encapsulated in the packet.
|
-- @param PDU SNMP Protocol Data Unit to be encapsulated in the packet.
|
||||||
|
|||||||
Reference in New Issue
Block a user