This is the documentation for the development version. There are no official binaries for it; build it from the source code in git. Download links on these pages work only after the release. For the current release, see version 7.0.

SNMPSet()

Deprecated in 3.0.

Please use set method of SNMPTransport class.

SNMPSet(transport, oid, value, dataType): bool

Perform SNMP SET request for oid over provided transport. Return boolean success indicator. value is automatically converted from string based in dataType. If dataType is not provided or cannot be resolved, default type "STRING" will be used.

Table 1. Parameters

transport

oid

SNMP OID string.

value

New value (String or ByteStream).

dataType

Type of the value, default to "STRING". SNMP data types

Return

Boolean. TRUE on success and FALSE in case of failure.

>>> if (!SNMPSet(transport, oid, "192.168.0.1", "IPADDR")) {
>>>     trace(1, "SNMPSet failed");
>>> }