[SNMP4J] TestAgent Trap

Houghton, Jack SPAWAR jack.houghton at navy.mil
Thu Dec 15 22:49:53 CET 2005


Thanks for the info, Frank. I hadn't dug deep enough in the code. I have
2 additional items:

1) What is the mechanism for a change in a MIB triggering a trap?
2) I believe I might have found a needed correction. In
NotificationOriginatorImpl.isAccessGranted(), should the following code:

    if (!notificationMIB.passesFilter(paramsRow.getIndex(),
notificationID, vbs)) {
      if (logger.isInfoEnabled()) {
        logger.info("Notification " + notificationID + " did not pass
filter " +
                    paramsRow.getIndex());
        return false;
      }
    }

be changed to:

    if (!notificationMIB.passesFilter(paramsRow.getIndex(),
notificationID, vbs)) {
      if (logger.isInfoEnabled()) {
        logger.info("Notification " + notificationID + " did not pass
filter " +
                    paramsRow.getIndex());
      }
      return false;
    }

Regards,
Jack Houghton

Hi Jack,

The TestAgent initiates a coldStart trap when it starts as follows:

    notificationOriginator.notify(new OctetString(), 
SnmpConstants.coldStart,
                                  new VariableBinding[0]);

Hope this helps.

Best regards,
Frank

Houghton, Jack SPAWAR wrote:

>Hi:
>This is hopefully an easy one: How would you initiate a trap with 
>TestAgent? Thanks,
>Jack Houghton
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>
>  
>


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




More information about the SNMP4J mailing list