Q: Snmp++ traps

Jochen Katz katz____telematik.informatik.uni-karlsruhe.de
Mon Oct 9 14:02:06 CEST 2000


Hi,

> I looked into snmp++ code , SnmpMessage::load()
> function is placing the agent addr by making  gethostname function . But
> this code is in the
> IF condition and it is done for V1 traps only .

if I'm not completly wrong, SNMPv2 Traps don't have the agent_addr value
defined, as any Oid/value pair that is needed by the manager can be sent
inside the variable binding list of the trap pdu.

> How to make the trap pdu to contain the ipaddr of the M/C sending the
> trap ?

There are two possibilities how to get the address of the agent who sent
the trap:

- The manager receives a Target object with the Pdu object that contains
the address of the host sending the trap.

- You can define your own trap type that contains the address of the
agent in the variable binding list of the trap.

Best regards,
  Jochen



More information about the AGENTPP mailing list