添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
buildTrap (enterpriseOid, agentIp, genTrap, specTrap, timeStamp)
Create an SNMP Trap PDU.

connect (self)
Connect to the server For UDP ports, this doesn't send any packets, but it creates the socket and locks in the timeout.

decode (encStr, pos)
Decodes an SNMP packet or a part of it according to ASN.1 basic encoding rules.

encode (val)
Encodes a given value according to ASN.1 basic encoding rules for SNMP packet creation.

fetchResponseValues (resp)
Fetches values from a SNMP response.

get (self, options, ...)
Sends an SNMP Get request

getnext (self, options, ...)
Sends an SNMP Get Next request

ip2str (ip)
Transforms a table representing an IP to a string.

new (self, host, port, community, options)
Creates a new Helper instance

oid2str (oid)
Transforms a table representing an object identifier to a string.

request (self, message)
Communications helper Sends an SNMP message and receives a response.

set (self, options, oid, setparam, value)
Sends an SNMP Set request

str2ip (ipStr)
Transforms a string into an IP table.

str2oid (oidStr)
Transforms a string into an object identifier table.

walk (self, base_oid)
Walks the MIB Tree

PDU
SNMP Protocol Data Unit to be encapsulated in the packet.
version
SNMP version; defaults to script argument snmp.version
commStr
community string.
options
SNMP options table
oid
Object identifiers of object to be set.
value
To which value object should be set. If given a table, use the table instead of OID/value pair.
host
string containing the host name or ip
port
table containing the port details to connect to
community
string containing SNMP community
options
A table with appropriate options: * timeout - the timeout in milliseconds (Default: 5000) * version - the SNMP version; defaults to script argument snmp.version .
oid
Object identifiers of object to be set.
setparam
value
To which value object should be set. If given a table, use the table instead of OID/value pair.