Re: Having problem with stirng index table

geri noorzaman <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
The example value of data->wmanIfBsSsMacAddress is a string like 'AA:BB:CC:DD:EE:FF'. Sorry, but I don't get what you mean, so instead of using code like:

snmp_set_var_value(vptr,idx1,strlen(idx1));

just use code like this:

snmp_set_var_value(vptr,idx1,17); ???

Thank u, for response.





________________________________
From: Dave Shield <[email protected]>
To: geri noorzaman <[email protected]>
Cc: [email protected]
Sent: Saturday, June 6, 2009 5:24:48 PM
Subject: Re: Having problem with stirng index table

2009/6/5 geri noorzaman <[email protected]>:
>     unsigned char idx1[65535];
>     strcpy(idx1,data->wmanIfBsSsMacAddress);
>     snmp_set_var_value(vptr,idx1,strlen(idx1));

What value does 'data->wmanIfBsSsMacAddress' have?
Given that this is presumably a binary string, it would be
more sensible to use a fixed size, rather than "strlen"
(which assumes null-terminated printable strings)


It might be helpful to include some debugging code
(in both your get_{first,next} routines, and the main handler)
so that you can see exactly what values are actually being
worked with.

Dave

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.