Tcl wrapper over net-snmp library

This is a discussion on Tcl wrapper over net-snmp library within the SNMP Coders forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. ------_=_NextPart_001_01C5EF93.4B8F388A Content-Type: text/plain; charset="iso-8859-...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-22-2005
 
Posts: n/a
Default Tcl wrapper over net-snmp library

This is a multi-part message in MIME format.

------_=_NextPart_001_01C5EF93.4B8F388A
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

We are writing a Tcl Wrapper over the NET-SNMP library as we did not =
want to use the library executables directly because of performance =
issues.

The library uses fprintf(stderr,...) statements to print the ouput.

With the Tcl Wrapper, the net-snmp commands can be executed from the tcl =
shell as commands.=20

The problem is, the output of the command execution is displayed on the =
terminal because of the fprintf's used within the library. Since I am =
calling the command from within a tcl script, I am not able to capture =
the result (printed on the stderr).=20

I execute the net-snmp commands by using=20

if {![catch {eval $cmd} status]} {

#print the required message or the result=20

}

There is nothing stored in the status variable.

I would appreciate any kind of help here...

Thanks & regards,

Sanjib.


------_=_NextPart_001_01C5EF93.4B8F388A
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML =
DIR=3Dltr><HEAD><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1"></HEAD><BODY><DIV><FONT face=3D'Arial' =
color=3D#000000 size=3D2><FONT size=3D2>=0A=
<P>Hi,</P>=0A=
<P>We are writing a Tcl Wrapper over the NET-SNMP library as we did not =
want to =0A=
use the library executables directly because of performance issues.</P>=0A=
<P>The library uses fprintf(stderr,...) statements to print the =
ouput.</P>=0A=
<P>With the Tcl Wrapper, the net-snmp commands can be executed from the =
tcl =0A=
shell as commands. </P>=0A=
<P>The problem is, the output of the command execution is displayed on =
the =0A=
terminal because of the fprintf's used within the library. Since I am =
calling =0A=
the command from within a tcl script, I am not able to capture the =
result =0A=
(printed on the stderr). </P>=0A=
<P>I execute the net-snmp commands by using </P>=0A=
<P>if {![catch {eval $cmd} status]} {</P>=0A=
<P>#print the required message or the result </P>=0A=
<P>}</P>=0A=
<P>There is nothing stored in the status variable.</P>=0A=
<P>I would appreciate any kind of help here...</P>=0A=
<P>Thanks &amp; regards,</P>=0A=
<P>Sanjib.</P></FONT></FONT></DIV></BODY></HTML>
------_=_NextPart_001_01C5EF93.4B8F388A--


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:12 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0