Pike v8.1 release 6

Method Protocols.SNMP.protocol()->set_request()


Method set_request

int set_request(mapping varlist, string|void rem_addr, int|void rem_port)

Description

SetRequest-PDU call

Parameter varlist

a mapping of OIDs to SET

oid1 : array
Array
string type

data type such as tick, oid, gauge, etc

mixed data

data to return for oid1

oid2 : array
Array
string type

data type such as tick, oid, gauge, etc

mixed data

data to return for oid2

oidn : array
Array
string type

data type such as tick, oid, gauge, etc

mixed data

data to return for oidn

Parameter rem_addr
Parameter rem_port

remote address an UDP port to send request to (optional)

Returns

request ID

Example

// set the value of 1.3.6.1.4.1.1882.2.1 to "blah". object s=Protocols.SNMP.protocol(); s->snmp_community="mysetcommunity"; mapping req=(["1.3.6.1.4.1.1882.2.1": ({"str", "blah"})]); int id=s->set_request(req, "172.21.124.32");