[SNMP4J] notify method in NotificationOriginatorImpl

Frank Fock fock at agentpp.com
Wed Jul 6 20:31:53 CEST 2005


Hello Murali,

Please find my answers below:

Muralidharan Narayanan wrote:

>Hello All,
>
>Can someone help me understand the notify method of
>NotificationOriginatorImpl a little more better. The method signature says:
>public org.snmp4j.event.ResponseEvent[] notify(org.snmp4j.smi.OctetString
>context,
>                                               org.snmp4j.smi.OID
>notificationID,
>                                               org.snmp4j.smi.VariableBindin
>g[] vbs)
>
>I understand that this method essentially sends notification to the targets
>registered with targetMIB and notificationMIB (using methods
>addTargetAddress, addTargetParams and addNotifyEntry).
>
>The question is about parameters in the method.
>
>1) I understand that the notificationID can be from any of the 6 generic
>types or can it be some vendor specific trap type defined in vendor's MIB
>file. What should be the format of vendor specific trap type? Is it a simple
>OID in usual notation such as 1.3.6.1.4.1.8716.2....?
>
>  
>
Yes, it is a normal OID. To facilitate sending SNMPv1 traps, the OID
should have a zero sub-identifier as the second to last sub-ID, e.g.:
1.3.6.1.2.1.47.2.0.1 (enConfigChange from the ENTITY-MIB)
There is also a mapping from NOTIFICATION-TYPE OIDs to
SNMPv1 traps defined in RFC2576, "Coexistence between Version..."
which will be implemented in the final 1.0 release of SNMP4J-Agent.

>2)  I am not sure what this vbs array is used for. What "payload of the
>notification" does it mean? Does someone have an example of this parameter's
>  
>
The linkDown notification type, for example, defines three objects to be
included as payload into the notification: ifIndex, ifAdminStatus, 
ifOperStatus.
In addition to the objects defined in a notification type, an agent 
implementor
can include other object instances to provide more information.

>usage? Also I am wondering how the array returned is used etc.
>
>  
>
The returned array can be ignored in almost all cases. There have been
some users in the past (AGENT++ related) that wanted to use the
information about the delivery of inform requests.

Best regards,
Frank




More information about the SNMP4J mailing list