On 22 Oct 2007 10:14:09 -0000, girish <[EMAIL PROTECTED]> wrote:
> In the subagent i've this code for the object.


>     struct myTable_entry {
            :
>     long            myId;
>     char            UserLabel[NNN];
            :
> };
>             switch (table_info->colnum) {
>             case COLUMN_USERLABEL:
>                 ret = netsnmp_check_vb_type_and_size(request->requestvb,
>                                                    ASN_OCTET_STR, NNN);


Hmmm....
It looks suspiciously as if you haven't edited the template code at all.
In particular, you need to specify the size of the field 'UserLabel',
and the size passed to the validation routine.

Given that you've left these as 'NNN', then I'm surprised that the subagent
even compiles!

The other thing that you might need to do is replace the call
      'netsnmp_check_vb_type_and_size(....)'
with an equivalent call to 'netsnmp_check_vb_type_and_max_size()'
Which call to use depends on the characteristics of the MIB object
that you are implementing.   Does it always take a value of *exactly*
NNN characters, or does it take a value of *no more than* NNN chars?

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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