Re: netsnmp_tdata * table_data structure

"Richard Horton" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2008/7/17 Dave Shield <[email protected]>:

> Do you set the length of the string values anywhere?
> (i.e. entry->gdukHornetRadioName_len)
>
>
> Remember that by default, the code for returning values looks
> like:
>      snmp_set_var_typed_value( request->requestvb,  TYPE,
>                        entry->string_field,   entry->string_field_len);
>
> so that it can handle binary string values.
> If you know that all strings will definitely be printable
> (and no embedded null characters), then you can tweak
> this to use 'strlen(entry->string_field)' instead,
> and drop the 'string_field_len' completely.
>
>
> But if you're using the default code, then you need to
> set the length as well as the string value.   Otherwise
> this length will remain at 0, any extra characters
> (i.e. all of them!) will be ignored
>
> Dave
>

That's the problem (well hope it is - just going to recompile now) :)

Thanks,

Richard.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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.