[SNMP4J] notify method in NotificationOriginatorImpl

Muralidharan Narayanan murali at TriveniDigital.com
Wed Jul 6 20:45:35 CEST 2005


> 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)

Thanks Frank for your reply.

1) Is there any restriction or rules for choosing the last sub-ID. In other
words, can last sub-ID simply start from "1"? I saw the enConfigChange
example from the ENTITY-MIB. But since enConfigChange was the only trap I
was not able to deduce anything about the last sub-ID.

2) Will this trap/notification format hold for all SNMP versions (v1, v2c,
v3) at this time? I see that you are working on conformance between versions
in next release of agent.

Thanks
Murali


> -----Original Message-----
> From: Frank Fock [mailto:fock at agentpp.com]
> Sent: Wednesday, July 06, 2005 2:32 PM
> To: Muralidharan Narayanan
> Cc: snmp4j at agentpp.org
> Subject: Re: [SNMP4J] notify method in NotificationOriginatorImpl
>
>
> 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