[AGENT++] does Agenpro2 call correct OctetStr constructor?
Dave Mason
dmason at transat-tech.com
Wed Sep 3 23:59:13 CEST 2003
Hi,
I'm comparing the output of AgenPro v2 with v1.8.6 and noticed this
difference. I have a MIB object that is a 6 byte hex value, used for IP
address and port. The MIB definition looks like this:
ipAddrPort OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (6))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
""
DEFVAL { '7f00000100a2'H }
::= { configObjects 1 }
AgenPro v1.8.6 generated this constructor:
ipAddrPort::ipAddrPort():
MibLeaf(oidIpAddrPort, READWRITE, new OctetStr((unsigned
char*)"\x7f\x00\x00\x01\x00\xa2", 6ul), VMODE_DEFAULT)
{
...
}
AgenPro v2.0.6 does this:
ipAddrPort::ipAddrPort():
MibLeaf(oidIpAddrPort, READWRITE, new
OctetStr("\x7f\x00\x00\x01\x00\xa2"), VMODE_DEFAULT){
...
}
If we dont't have the second 6ul size argument, won't the OctetStr
constructor assume that the first \x00 is an end of string?
Regards,
Dave
More information about the AGENTPP
mailing list