how can I attach a Format to an snmp trap?

Frank Fock Frank.Fock____t-online.de
Thu May 3 01:04:16 CEST 2001


Hi Noam,

Noam Wolf wrote:

> My question is, when I send a trap, I use the NotificationOriginator's
> function "generate" as follows:
>
> newTrap.generate(vbx, 3, "tcp connection overload"); //newTrap is of type
> NotificationOriginator
>

As NotificationOriginator does not have a "generate" method with
three parameters, I assume that your class is AgentGen generated. In this
case the third parameter denotes the context where the trap has been
generated. Thus, in most cases this will be "". The context is part of the
SNMPv3 protocol. It is not known in SNMPv1 or v2c.

>
> The trap is sent, but without a Format attached. I thought the attached
> string (in this case,  "tcp connection overload") is the format that
> describes the trap. Do I have to add the trap pdu a string that describes
> the trap, or is there a more "elegant" way?

No, there is no other way. You will have to define such an object in
your trap definition or just add it to the trap respectively.

Best regards,
Frank




More information about the AGENTPP mailing list