How to send/receive a v1 trap
Jochen Katz
katz____agentpp.com
Thu May 2 20:01:48 CEST 2002
Hi,
> I have tried two experiments with this ( both with trap sender and
> receiver made using SNMP++ ). In both scenerios I set an enterprise oid in
> the pdu.
>
> In the first scenerio I built the trapid Oid as "enterpriseOid + 0 +
> specific trap". When I called get_printable on this oid from the sender i
> get something like "1.3.6.1.4.1.6161.0.1". But when I call get_printable on
> the receiver I get "1.3.6.1.4.1.6161.1".
so I will add the code to the next release of snmp++ that inserts the .0
when receiving a v1 trap with specific id.
> In the second scenerio I built the trapid Oid as "0 + specific trap".
> When I called get_printable on this oid from the sender i get something like
> ".0.1". But when I call get_printable on the receiver I get ".0.0.1".
This is not supported by snmp++, as the enterprise id is taken form the
prefix of the trap id if it is of specific type.
> I notice that all the devices that send SNMP v1 traps that we monitor
> seem to follow the <enterprise oid>.<specific trap> pattern. So, should I
> only look for this pattern, or should I be prepared to search for the
> <enterprise oid>.0.<specefic trap> pattern as well.
Within the snmp pdu on the wire, the <enterprise oid> and <specific
trap> are encoded into seperate fields. The receiving snmp entity
constructs the enterprise and trap oids from these fields. So you should
always receive an id with .0.
Kind regards,
Jochen
More information about the AGENTPP
mailing list