in reply to How to code snmpset ?

you probably want a 4 byte string.
$ perl -le 'print pack("C*",split(/\./,"127.0.0.1"))' | od -t xC 0000000 7f 00 00 01 0000004
which i think would match your snmpset 'x' "hex" example. you might also need to change the IPADDRESS to OCTETSTR or whatever Net::SNMP uses for a string of octets.

Replies are listed 'Best First'.
Re^2: How to code snmpset ?
by iwanthome (Beadle) on Mar 24, 2005 at 08:30 UTC
    thanks! I do it like pack("C*",split(/\./,"127.0.0.1")),and it success.