Important
|
Deprecated in 3.0. Please use get method of [class-snmptransport] class. |
SNMPGet(transport, oid) => SNMP_VarBind
Perform SNMP GET request for oid
over provided transport.
transport |
Transport created by [func-createsnmptransport]. |
oid |
SNMP OID string. |
Return
Instance of [class-snmpvarbind] or null
on failure.
Example
>>> transport = CreateSNMPTransport(FindObject("Server1")); >>> if (transport != null) { >>> oid = ".1.3.6.1.2.1.25.1.6.0"; // number of running processes >>> varbind = SNMPGet(transport, oid); >>> if (varbind != null) { >>> trace(1, varbind.name .. "=" .. varbind.value); >>> } >>> else { >>> trace(0, "SNMPGet() failed"); >>> } >>> }