emergency agent++ question

Alex Finogenov afinogenov____malibunet.com
Thu Aug 2 22:03:50 CEST 2001


Yael,

It seems to me that all communication is done through the RequestList class,
which specifically uses its 'snmp' member of Snmpx * type. This class also
has a public accessor and mutator for this member: RequestList::set_snmp()
and RequestList::get_snmp().

If you create an Snmpx object using the constructor that Frank proposed, you
can  pass the newly created one to the RequestList::set_snmp(Snmpx *
session). Don't forget to delete the current 'snmp' object (it had to be
passed initially to the setter method, but you can use the accessor to
retrieve the pointer to the object anywhere and delete it).

I have not tried any of this, just looked up in the agent++ source since you
guys are talking about it.

Thanks,
Alex 

-----Original Message-----
From: Yael Yankelev [mailto:yael____flashnetworks.com]
Sent: Thursday, August 02, 2001 6:55 AM
To: 'Frank.Fock____t-online.de'
Cc: agentpp-dl____agentpp.com; Polina Nepomnyashy
Subject: RE: emergency agent++ question



Hi Frank,

I'm don't think either of these suggestions will help.  
I need to know where it is, in the agent, that you create the socket which
you bind as the listening socket.  If I can access this part of the code, I
can set to it the (source) IP address to use for the socket.

For sending traps, once again I need to see where you create the socket that
you use to send the traps, and created with the same (source) IP address as
above.

is this:  

DLLOPT int send_snmp_request( int sock, unsigned char *send_buf,
			      size_t send_len, Address & address)

The function you were talning about.  or is there really an
snmp::send_snmp_request... I couldn't find it.

Thanks again,

Yael



> -----Original Message-----
> From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
> Sent: Thursday, August 02, 2001 12:11 PM
> To: Yael Yankelev
> Cc: agentpp-dl____agentpp.com
> Subject: Re: emergency agent++ question
> 
> 
> Hi Yael,
> 
> For the listening port this can be set easily using the
> Snmpx(int& status, const UdpAddress&) constructor.
> However, for sending traps an arbitrary interface is
> used. I will fix that in the next release of SNMP++v3.1.
> (You might want to change it yourself in 
> Snmp::send_snmp_request).
> 
> Hope this helps anyway.
> 
> Best regards,
> Frank
> 
> Yael Yankelev schrieb:
> > 
> > 
> > Hi Frank,
> > 
> > We have just learned that we need to be able to set (upon 
> > initialization) 
> > the IP address on which the agent running.  That is, the 
> > machine our agent 
> > is running on may have multiple Network interfaces, and 
> > we must be able to 
> > choose one to work with one of the interfaces so that the 
> > agent will 
> > ultimatly listen on, and send alerts from, the chosen IP 
> > address.   
> > 
> > Please say there is an easy way to do this.
> > 
> > thanks,
> > 
> > Yael
> > 
> >
> 



More information about the AGENTPP mailing list