[SNMP4J] [Question]about the TimeCheck:

Frank Fock fock at agentpp.com
Thu Jul 9 23:47:18 CEST 2009


Hi,

wei tong wrote:
>     why a Request with different EngineID can jump the time Check?
>
Since the engine IDs differ, which timestamps
do you want to compare?


>     that means if we using a snmptool to sent trap to local TrapReceiver, it
> will be refused after 150 sec
>     because the "entry.getLatestReceivedTime()" is always zero.

I cannot follow your argumentation here. Have you
read the USM RFC and understood what getTimeDiff()
computes? Then please rephrase your question.

Best regards,
Frank

> 
>     thx for all.
> 
>     if (localTime.getEngineID().equals(entry.getEngineID())) {
>       /* Entry found, we are authoritative */
>       if ((localTime.getEngineBoots() == 2147483647) ||
>           (localTime.getEngineBoots() != entry.getEngineBoots()) ||
>           (Math.abs(now + localTime.getTimeDiff() -
> entry.getLatestReceivedTime())
>            > 150)) {
>         if (logger.isDebugEnabled()) {
>           logger.debug(
>               "CheckTime: received message outside time window
> (authorative):"+
>               ((localTime.getEngineBoots() !=
>                 entry.getEngineBoots()) ? "engineBoots differ" :
>                ""+(Math.abs(now + localTime.getTimeDiff() -
>                             entry.getLatestReceivedTime()))+" > 150"));
>         }
>         return SnmpConstants.SNMPv3_USM_NOT_IN_TIME_WINDOW;
>       }
>       else {
>         if (logger.isDebugEnabled()) {
>           logger.debug("CheckTime: time ok (authorative)");
>         }
>         return SnmpConstants.SNMPv3_USM_OK;
>       }
>     }
>     else ...
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list