Yes, I think so, because if not you will have blank rows in your mib.
- Store the number of rows created the first time.
- At next GET, count the number of elements in your external table.
- Compare the rows in your external table and the rows created previously with Table_createEntry.
- I this way you can add or delete rows with Table_createEntry or Table_removeEntry
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]
Web
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]> wrote: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.Hi,I did something like you have to do. I used simply mib2c, and after Ichoose 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
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