agent++3.3 SnmpRequest::trap

Guy.HINDELL____opentrade.co.uk Guy.HINDELL____opentrade.co.uk
Fri Apr 7 12:58:17 CEST 2000


Hi Jochen

Many thanks for that - it works now. In fact I don't think it is possible to
create the CTarget object direct from a char * - the constructor prototype
can take a reference to an Address object, but not a UdpAddress, so
CTarget("targethost:162") won't work, but
CTarget(UdpAddress("targethost:162")) will. Whatever.

I can see a couple of curious pieces of behaviour with traps sent using
Agent++. I am using the UCD 'snmptrapd' program as a receiver, and it shows
an 'Uptime' as part of the trap (both version1 and version2c) which is way
higher than the actual system uptime (a couple of months), or the uptime of
the agent (a few seconds). I see this when sending traps from both my
Solaris and Linux agents.

The NT extension agent behaves slightly differently - it produces very high
uptimes which appear to be several orders of magnitude greater than the
uptime of the agent and rapidly increase between traps. I wonder if a time
value is being passed somewhere in milliseconds rather than seconds?

Thanks again for your help

guy



		-----Original Message-----
		From:	Jochen Katz [mailto:katz____agentpp.com]
		Sent:	Friday, April 07, 2000 1:56 AM
		To:	Guy.HINDELL____opentrade.co.uk
		Cc:	agentpp-dl____fock.de
		Subject:	Re: agent++3.3 SnmpRequest::trap

		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


* ------------------------------------------------------------------------ *
 Privileged/Confidential Information may be contained in this 
 message. If you are not the addressee indicated in this      
 message (or responsible for delivery of the message to such  
 person), you may not copy or deliver this message to anyone. 
 In such case, you should destroy this message and kindly     
 notify the sender by reply e-mail. Please advise immediately 
 if you or your employer does not consent to Internet e-mail  
 for messages of this kind. Opinions, conclusions and other   
 information in this message that do not relate to the        
 official business of my Company shall be understood as       
 neither given or endorsed by it.                             
* ------------------------------------------------------------------------ *





More information about the AGENTPP mailing list