Marc Martinez
2003-11-07 09:14:31 UTC
scalar_int.c
http://net-snmp.sourceforge.net/tutorial-5/agent/scalar__int_8c-example.html
<http://net-snmp.sourceforge.net/tutorial-5/agent/scalar__int_8c-example.htm
l>
When i try to use this sample on my snmp-agent i have somws errors....what
i doing wrong ???!!???
(SunOs 5.8 with net-snmp 5.1.pre3 (same probleme with version 5.0.9))
Starting agent...with
snmpd -f -L -Ddlmod,steAlrInt,example_steAlrInt,example_steAlrInt
dlmod: register mib
dlmod: dlmod_path: /products/net-snmp/lib/snmp/dlmod
dlmod: dlmod_create_module
dlmod: dlmod_create_module
dlmod: dlmod_load_module steAlrInt: /products/net-snmp/lib/steAlrInt.so
example_steAlrInt: Initalizing example scalar int. Default value = 42
example_steAlrInt: Done initalizing example scalar int
NET-SNMP version 5.1.pre3
When i get the value...
snmpget loclahost MY-MIB::steAlrInt.0
MY-MIB::steAlrInt.0 = INTEGER: 42
When i try to set the value
snmpset -c private MY-MIB::steAlrInt.0 i 12
Error in packet.
Reason: (badValue) The value given has the wrong type or length.
Failed object: MIY-MIB::steAlrInt.0
Or
snmpset -c private MY-MIB::steAlrInt.0=12
MY-MIB::steAlrInt.0=12: Needs type and value
snmptranslate -Tp MY-MIB::steAlrInt
+-- -RW- Integer32 steAlrInt(3)
http://net-snmp.sourceforge.net/tutorial-5/agent/scalar__int_8c-example.html
<http://net-snmp.sourceforge.net/tutorial-5/agent/scalar__int_8c-example.htm
l>
When i try to use this sample on my snmp-agent i have somws errors....what
i doing wrong ???!!???
(SunOs 5.8 with net-snmp 5.1.pre3 (same probleme with version 5.0.9))
Starting agent...with
snmpd -f -L -Ddlmod,steAlrInt,example_steAlrInt,example_steAlrInt
dlmod: register mib
dlmod: dlmod_path: /products/net-snmp/lib/snmp/dlmod
dlmod: dlmod_create_module
dlmod: dlmod_create_module
dlmod: dlmod_load_module steAlrInt: /products/net-snmp/lib/steAlrInt.so
example_steAlrInt: Initalizing example scalar int. Default value = 42
example_steAlrInt: Done initalizing example scalar int
NET-SNMP version 5.1.pre3
When i get the value...
snmpget loclahost MY-MIB::steAlrInt.0
MY-MIB::steAlrInt.0 = INTEGER: 42
When i try to set the value
snmpset -c private MY-MIB::steAlrInt.0 i 12
Error in packet.
Reason: (badValue) The value given has the wrong type or length.
Failed object: MIY-MIB::steAlrInt.0
Or
snmpset -c private MY-MIB::steAlrInt.0=12
MY-MIB::steAlrInt.0=12: Needs type and value
snmptranslate -Tp MY-MIB::steAlrInt
+-- -RW- Integer32 steAlrInt(3)