[SNMP4J] SNMP4J PDUv1 Trap setting SysUpTime throws an Exception
Rory Marquis
roridge at hotmail.com
Fri Dec 15 17:51:10 CET 2006
Hi Frank and everyone else
I have been creating v1 Traps today, and have noticed that when I set the
sysUpTime timestamp in the PDU, it allows a long value as the argument but
then sets the value into a TimeTicks object, which inherits the
UnsignedInteger32.
This becomes an issue when the server has been up for more than 248 days
(measured in TimeTicks).
I was wondering, is this an oversight, or a feature?
Code when run, throws an IllegalArgumentException:
PDUv1 pdu = new PDUv1();
long sysUpTime = 100*60*60*24*249; //248 days max
pdu.setTimestamp(sysUpTime);
Exception in thread "main" java.lang.IllegalArgumentException:
Argument must be an unsigned 32bit value
Thanks in advance
Rory
_________________________________________________________________
Find Singles In Your Area Now With Match.com! msnuk.match.com
More information about the SNMP4J
mailing list