Table iterator and deprecated columns

Sup Raja <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CALVSaDMH-CUKUiFu+w9ZpUWEGK3R5VBcgrqGL4P0JC1TbLBerA@mail.gmail.com>
Hi,
    I am using netsnmp table iterator and I like it. I am seeing one issue
when a column is deprecated in the table snmpwalk does not continue it
stops at the column before the deprecated object. For example I have table
like this

FileTable:
     FileIndex
     FileName
     FileDate
     FilePermission
     Fileowner
     FileBits

I have changed the table like this

FileTable:
     FileIndex
     FileName
     FileDate
     FilePermission
     Fileowner
     FileBits           <==  Deprecated
     FileMask


I have changed the following in the net-snmp generated code.

   my_handler = netsnmp_create_handler_registration("fileTable",
                                             fileTable_handler,
                                             fileTable_oid,
                                             OID_LENGTH(fileTable_oid),
                                             HANDLER_CAN_RONLY);

    if (!my_handler || !table_info || !xinfo) {
        SNMP_FREE(xinfo);
        SNMP_FREE(table_info);
        return;
    }

    netsnmp_table_helper_add_indexes(table_info,ASN_INTEGER,0);

    table_info->min_column = 1;
    table_info->max_column = 7;     <= Earlier it was 6

    iinfo->get_first_data_point = fileTable_get_first_data_point;
    iinfo->get_next_data_point = fileTable_get_next_data_point;


int
fileTable_handler(netsnmp_mib_handler       *handler,
                                netsnmp_handler_registration *reginfo,
                                netsnmp_agent_request_info   *reqinfo,
                                netsnmp_request_info         *requests)
{

            case COLUMN_FILEOWNER:
                {
                }
                break;

//           case COLUMN_FILEBITS:     <== Commented
//                {
//
//                }
//                break;

            case COLUMN_FILEMASK:    <==  Added
                {

                }
                break;
}

Now when I do snmpwalk on fileTable it stops at the *FileOwner *and does
not continue to *FileMask*. I have tried various options without luck how
to tell table iterator to skip columns which are deprecated.  Please help.

Thanks,
Priya

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
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.