R: R: which mib2c conf
Palmentieri Nunzio <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <49FCBDCB40420B409FB4EA8D712CC66D03EDFEF8@srv003snap.napoli.it.int.atosorigin.com> |
Unfortunately, in my case the number of rows could change only at start-up time. Is it correct to re-write row's values at GET query time? Yes, I think so, because if not you will have blank rows in your mib. I think you could do in the following way. 1. Store the number of rows created the first time. 2. At next GET, count the number of elements in your external table. 3. Compare the rows in your external table and the rows created previously with Table_createEntry. 4. I this way you can add or delete rows with Table_createEntry or Table_removeEntry This is an idea, pheraps anybody else knows a better way to solve this problem. Regards. Nunzio Palmentieri Web Care Solution Atos Origin Via Antiniana 2/a 80078 Pozzuoli (NA) - ITALY Direct +39 081 6103 388 Mobile +39 335 1214 806 Fax +39 081 6103 200 e-mail <mailto:[email protected]> mailto:[email protected] Web <http://www.atosorigin.com/> www.atosorigin.com This electronic message contains information from Atos Origin, which may be privileged and confidential. The information is intended to be use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. -----Messaggio originale----- Da: hjubal [mailto:[email protected]] Inviato: venerdì 10 marzo 2006 12.50 A: Palmentieri Nunzio Oggetto: Re: R: which mib2c conf On 3/10/06, Palmentieri Nunzio < [email protected] <mailto:[email protected]> > wrote: Hi, I did something like you have to do. I used simply mib2c, and after I choose the options as follows: _____________________________________________________ /home/SMSproxy/net-snmp-5.2.2/bin/mib2c pfeTable 1) ucd-snmp style code 2) Net-SNMP style code Select your choice : 2 ********************************************************************** GENERATING CODE FOR TABLES: ********************************************************************** Select the option that best fits you: 2 Select the API style you wish to use: 2 _____________________________________________________ Regarding the rows dinamically created, I did in this way: In the generated function void initialize_table_pfeTable(void) I count the number of objects I want to put in the mib, then I do: for(iIndex = 0; iIndex < iTotalObjectTable; iIndex++) { table_row = (netsnmp_table_row *)pfeTable_createEntry(table_data, iIndex); } I hope this can help you. Nunzio Palmentieri Web Care Solution ok, by this way I populate the table with initial values, and this is ok for module start up. Then I have to update those values each time the subagent is queried. Is it correct to re-write row's values at GET query time? "mib2c -c mib2c.array-user.conf ..." generates code with container.. I'm a bit confused about container approch.. Is there any tutorial, examples, snippets to study? Thanks again.. // hj