SNMP Manager Programmer's Guide

Programming Examples
SNMP Manager Programmer’s Guide–134249
2-67
SNMPSET
SNMPSET
SNMPSET handles a Set packet for one or more MIB objects, encoding the packet for
UDP or IPC communication in the same fashion as SNMPGET.
Invoke SNMPSET as follows. If you want to change the value of a MIB-II object, you
can simply identify it by name. To change the value of a non-MIB-II object, you must
use the -l parameter and identify the object using its OID and data type:
-l
stands for long form. Use this parameter when changing the value of MIB objects
that are not MIB-II objects.
agent-community string
is the community name used by the target agent for request authentication. You can
format the community name as a displayable string or as a sequence of octets, where
each octet is an 8-bit hexadecimal value:
"myCommunity"
0x4D:0x65
The default is "public".
request-id
is an integer in the range -2147483648 to 2147483647 that uniquely identifies the
first request packet sent by the manager. The default is 1. If retry-count is
greater than 0, the request ID is incremented by one each time another request is
sent.
agent-request-port
is the UDP destination port to use to address the agent. The default is 161.
retry-count
specifies the number of times to resend the packet if an error occurs. The default is
0.
SNMPSET [-l]
[-c agent-community string]
[-i request-id]
[-p agent-request-port}
[-r retry-count]
[-t timeout-seconds]
[-a NonStop-agent-process]
[-x output-information-level]
target-host-identifier
{MIB-object [data-type]value} ...