On 16 Nov 2004 09:00:06 +0530 Sasikumar wrote:
SB> On Tue, 2004-11-16 at 05:51, Robert Story wrote:
SB> > On 05 Nov 2004 10:50:22 +0530 Sasikumar wrote:
SB> > SB> cVal contains the result returned by the agent in string form, cVal
SB> > SB> is 
SB> > 
SB> > This is the problem. You want to pass the raw hex to
SB> > snmp_set_var_typed_value, not an actual string. If cVal is an ASCII
SB> > string, you need to convert it to 6 hex bytes before passing it in
SB> 
SB>   cVal is not containing ASCII string 

Yes it does. You even said "cVal contains the result returned by the agent in
string form". If you can print it using %s, it is a string. If it
were raw hex, you would have gotten 

   COLUMN_IPNETTOMEDIAPHYSADDRESS in string form is 

because the first character would have been 0x00, which is the string
terminator in C.

SB> Another observation in both the cases I am passing cVal string
SB> containing the hex format value which i got from the agent.

Exactly how was it obtained from the agent? And what do you do with it before
passing it around?

SB> I also examined the PDU of both the entries and found that for
SB> dot1dBaseBridgeAddress has value part in hex format.
SB> ipNettoMediaPhyAddress has value part in ASCII format.

If you are getting a 17 byte ASCII string from the agent, then the agent has a
bug.

-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>  
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to