Title: Messaggio
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
 
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 9.35
A: net-snmp-users@lists.sourceforge.net
Oggetto: which mib2c conf

Hi, I have to develop a subagent.
I'm not sure which mib2c configuration to choose. My mib contains a table and the index is an INTEGER, plus other fields.
Table's entries are read-only but values have to be filled at run-time reading an external file.

At first I've used "mib2c.array-user.conf".
The problem comes when I try to dynamically add rows to my table.
Is it correct create and write updated rows just before GET requests?

Is the right way?

Thanks in advance.

// hJ

Reply via email to