This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sending traps from a thread other than the snmpd thread..


Thanks for the response, Andrew. I have had the same
experience so far. The agent thread stack size is 100K+!

In examining the source I found that both the trap and 
the snmp-get/set operations end up using the send (socket)
function call. This function is thread safe, isnt it?
Looking at the code, there is a LOCK_SOCKET macro call
that seems to lock the file descriptor for the socket.

- Anunoy

--- Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, May 19, 2004 at 02:35:48PM -0700, agyhoo wrote:
> > Is it possible to send a trap from a thread other
> > than the snmpd thread safely? In other words are
> > the send_easy_trap, send_trap_vars etc. API thread
> > safe?
> > 
> > If anyone has done this, I would appreciate any info.
> > Thanks.
> 
> I've done this and it worked OK. I don't remember
> actually checking if
> it was thread safe though. You do need a big stack though
> otherwise
> you overflow it.
> 
>         Andrew



	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains ? Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]