problem setting a snmp gauge32
Posted: Wed Jul 17, 2013 12:51 pm
Hello NetBurner fans,
In developing a NTCIP application using snmpv1, we found that the present NetBurner snmp stack is not allowing a set of a gauge32. It is essential in the NTCIP 1103v02 standard that the Community Name Table have a writable mask, which is a gauge data type (snmpv1 all gauges are 32 bit). Tracing a snmpset into snmp.cpp:
BaseTablePutOIDFunction is called
switch on wlo->WriteType goes to WRITE_Int
switch on wlo->ObjectType goes to SMI_GAUGE32
req.get_asn.GetGauge32() returns 0
req.get_asn.error is true
Tracing into asn1.cpp:
ASN::GetGauge32 rv_type != SMI_GAUGE32 TRUE
also in asn1.cpp:
DWORD ASN::GetGauge32()
{
BYTE rv_type;
int objlen;
DWORD rv;
if ( RootParse( objlen, rv_type ) )
RootParse requires a pointer argument for rv: ( RootParse( objlen, &rv_type )
and clearly ASN::GetGauge32() passes the value rv and not its address.
Doesn't this look like the root cause of the error?
In developing a NTCIP application using snmpv1, we found that the present NetBurner snmp stack is not allowing a set of a gauge32. It is essential in the NTCIP 1103v02 standard that the Community Name Table have a writable mask, which is a gauge data type (snmpv1 all gauges are 32 bit). Tracing a snmpset into snmp.cpp:
BaseTablePutOIDFunction is called
switch on wlo->WriteType goes to WRITE_Int
switch on wlo->ObjectType goes to SMI_GAUGE32
req.get_asn.GetGauge32() returns 0
req.get_asn.error is true
Tracing into asn1.cpp:
ASN::GetGauge32 rv_type != SMI_GAUGE32 TRUE
also in asn1.cpp:
DWORD ASN::GetGauge32()
{
BYTE rv_type;
int objlen;
DWORD rv;
if ( RootParse( objlen, rv_type ) )
RootParse requires a pointer argument for rv: ( RootParse( objlen, &rv_type )
and clearly ASN::GetGauge32() passes the value rv and not its address.
Doesn't this look like the root cause of the error?