Re: [tkined] Direct use of the tnm library from c/c++

Matthew Upton (mupton@bridgewatersys.com)
Thu, 20 May 1999 11:53:18 -0400

My situation is similar to yours. I have been using the Tnm library from C++
in a multi-threaded environment (solaris also). The only way that I got
around the problem was to create a "tcl session" object and a "snmp session"
object which operates on a "tcl session" object.

The "tcl session" object holds an interpretor (Tcl_Interp) and the "snmp
session" performs its requests via "tcl session" eval operations. I made this
thread-safe by wrapping a token (recursive mutex) around all Tcl calls in the
tcl session object. This is by no means optimal but has been doing the job.

--

Matthew Upton Bridgewater Systems mupton@bridgewatersys.com

gary.hicking@wwgsolutions.com wrote:

> From: Gary Hicking@GLOBAL on 05/20/99 08:55 AM GDT > > To: tkined@ibr.cs.tu-bs.de > cc: Frank Strauss <strauss@ibr.cs.tu-bs.de> > Subject: Direct use of the tnm library from c/c++ > > I am using the tnm library (mainly for tnm mib use) in a multi threaded > solaris environment. > > Question 1 > -------------- > > Can anyone tell me if the library is meant to be thread safe? > > If not I assume the reasons for this are because of the global variables > used which hold status while a mib query is in progress. > > Anybody have any experience of modifying this library? > > Question 2 > -------------- > > It seems that you can load a single mib tree only. The root is held by the > variable 'tnm_MibTree' in the module tnmMibQuery.c. > > So if I want to load several MIBs (for differing network elements) or I > want to load differing versions of the same MIB (say during upgrade of > certain network elements) then I cannot do this unless I feed the root of > each mib tree in and out of the library as required somehow. > > Is this root ptr the only variable I need to consider to make this > multi-version-mib loadable? > > Regards > Gary Hicking > > ---------------------------------------------- > Wavetek, Wandel & Goltermann > Eurotech House, Burrington Way, > Plymouth, Devon, PL5 3LZ. > Tel : +44 (0) 1752 765707 > Fax : +44 (0) 1752 783000 > Mobile : +44 (0) 7771 822859 > e-mail : gary.hicking@wago.de > ----------------------------------------------- > > -- > !! This message is brought to you via the `tkined & scotty' mailing list. > !! Please do not reply to this message to unsubscribe. To subscribe or > !! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>. > !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.