Thanks Wes. Ignore my last query on netsnmp_table_helper_add_indexes().
I found where I did make the mistake.





________________________________
From: sujata patra <sujata_patra2...@yahoo.com>
To: Wes Hardaker <harda...@users.sourceforge.net>
Cc: Wes Hardaker <harda...@users.sourceforge.net>; 
net-snmp-coders@lists.sourceforge.net
Sent: Wed, December 22, 2010 2:46:33 PM
Subject: Re: doubt in nested table implementation







________________________________
From: Wes Hardaker <harda...@users.sourceforge.net>
To: sujata patra <sujata_patra2...@yahoo.com>
Cc: Wes Hardaker <harda...@users.sourceforge.net>; 
net-snmp-coders@lists.sourceforge.net
Sent: Wed, December 22, 2010 10:05:34 AM
Subject: Re: doubt in nested table implementation

>>>>> On Tue, 21 Dec 2010 20:15:12 -0800 (PST), sujata patra 
>>>>><sujata_patra2...@yahoo.com> said:

sp> Thanks Wes. That's right . I have got it now and able to progress . I was 
sp> confused whether to make tree structure .

Tree structures are not supported by SMIv2 (the MIB language).  If
you're getting the point of needing to do that it's probably time to
pick up a book on good mib design ("Understanding SNMP MIBs" is a good one).

sp> This is basically making the tree to linear array by storing the
sp> indexes of each parent/grand parent node. right ?

If you're familiar with relational databases, MIBs follow similar
concepts.  The topic is much longer than I can explain quickly over
mail, so I suggest you either read a good book or read the RFC  itself
(RFC2578).

sp> I have added  all the columns.
sp> netsnmp_table_helper_add_indexes(table_info,

The only columns you should add are the indexes.  The rest of them
shouldn't be there.
But how to tell about the columns? I do update the values of
 table_info->min_column =;
 table_info->max_column = ;

stack trace of crash point. This is  for a single table.

#0  snmp_set_var_value (vars=0x0, value=0xbfdcea12, len=10) at snmp_client.c:765
#1  0x08048f43 in messageTable_get_next_data_point (my_loop_context=0xbfdcecd8, 
my_data_context=0xbfdcecd4, put_index_data=0x91c17a8, 

    mydata=0x9161718) at abcModule.c:158
#2  0x0015f572 in netsnmp_table_iterator_helper_handler (handler=0x9161748, 
reginfo=0x9161438, reqinfo=0x91a9d48, requests=0x91aa728)
    at helpers/table_iterator.c:587
#3  0x001206c2 in  netsnmp_call_handler (next_handler=0x9161748, 
reginfo=0x9161438, reqinfo=0x91a9d48, requests=0x91aa728)
    at agent_handler.c:522

     netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER,
                                                  /* ASN_OCTET_STR,
                                                   ASN_INTEGER,
                                                  ASN_INTEGER, 
                                                  ASN_INTEGER,*/ 0);


It works fine if I uncomment the commented part from the above . any missing 
piece? attaching the file for your reference


-- 
Wes Hardaker
Please mail all replies to net-snmp-coders@lists.sourceforge.net


      
------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to