Difference between revisions of "NXSL:SNMPSet"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ Assign a specific value to the given SNMP object for the node. The node and all SNMP communication details defined by SNMP transport. == Syntax == SNMPSet(''trans...")
 
m (Text replacement - "^" to "{{deprecated}}")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
{{deprecated}}__NOTOC__
Assign a specific value to the given SNMP object for the node. The node and all SNMP communication details defined by SNMP transport.  
Assign a specific value to the given SNMP object for the node. The node and all SNMP communication details defined by SNMP transport.  
'''Since:''' 1.2.1


== Syntax ==
== Syntax ==
Line 25: Line 27:
== Examples ==
== Examples ==
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
ret = SNMPSet(transport, oid, "192.169.1.1", "IPADDR");
ret = SNMPSet(transport, oid, "192.168.0.1", "IPADDR");
if (!ret)
if (!ret)
{
{

Latest revision as of 16:13, 13 September 2022

This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Assign a specific value to the given SNMP object for the node. The node and all SNMP communication details defined by SNMP transport.

Since: 1.2.1

Syntax

SNMPSet(transport,oid,value,[data type]);

Parameters

transport SNMP_Transport SNMP transport object.
oid SNMP object id to start walking from.
value Value to assign to oid.
data type SNMP data type (optional).

Return Value

TRUE on success, FALSE in case of failure.

Examples

	ret = SNMPSet(transport, oid, "192.168.0.1", "IPADDR");
	if (!ret)
	{
		trace(1,"SNMPSet failed");
		return -1;
	}