On 10/03/2008, Raghavendra Prasad wrote:
> I have a requirement to find out the
> size of string-type MIB variables - unfortunately I could not figure
> out how to find the size of string variable,


What do you mean by that?
The size of an arbitrary string value that your MIB module should
report back? Or the size of a new string value that is being SET?
Or what?

The length of a varbind value in a SET command will be given by
the 'val_len' field. Note that such string values are typically
*not* null-terminated, so you can't simply use 'strlen()'


As far as the string values that you are reporting back are concerned,
the size of those strings depends on how you are retrieving these
value. We can't provide assistance there - you'll need to look at
where these values come from to check the appropriate size(s).

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users