agent++3.3 SnmpRequest::trap

Jochen Katz katz____agentpp.com
Fri Apr 7 02:55:50 CEST 2000


Hi,

> In v2.13 this takes a UdpAddress as its first argument, then the varbinds
> etc. This I was able to call by passing a char * which would be used by the
> UdpAddress constructor - something like this...
> 
> SnmpRequest::trap("targethost:162", var_binds, no_of_varbinds, ...)
> 
> This doesn't work with v3.3e, where the first argument to SnmpRequest::trap
> is an SnmpTarget object, itself constructed from an IpAddress object etc.
> 
> How are traps sent in v3.3e?

you can do this with the following commands:

	UdpAddress address("targethost:162");
	CTarget target(address);
	target.set_version(version1 or 2c);
	target.set_readcommunity("public");
	SnmpRequest::trap(target, vbs, vb_size, ...)

It should be possible to construct the target with a char*.

Best regards,
  Jochen



More information about the AGENTPP mailing list