Hi Angela, when you apply mibc -c c mib2c.iterate.conf you get as a result both
.h file and a .c file.
Example:
/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.iterate.conf,v 5.14 2004/10/14 12:57:33 dts12 Exp $
*/
#ifndef IPNETTOMEDIATABLE_H
#define IPNETTOMEDIATABLE_H
/*
* function declarations
*/
void init_ipNetToMediaTable(void);
void initialize_table_ipNetToMediaTable(void);
Netsnmp_Node_Handler ipNetToMediaTable_handler;
Netsnmp_First_Data_Point ipNetToMediaTable_get_first_data_point;
Netsnmp_Next_Data_Point ipNetToMediaTable_get_next_data_point;
/*
* column number definitions for table ipNetToMediaTable
*/
#define COLUMN_IPNETTOMEDIAIFINDEX 1
#define COLUMN_IPNETTOMEDIAPHYSADDRESS 2
#define COLUMN_IPNETTOMEDIANETADDRESS 3
#define COLUMN_IPNETTOMEDIATYPE 4
#endif /* IPNETTOMEDIATABLE_H */
I think you may change the values of the columns to whatever you like but pay
attention that means that these columns will be reported under that values.
Another source for confusion is the MIBS loaded for the snmpwalk you are using
the MIB should be in synch with these numbers.
If the source of confusion is a bug in mibc.iterate.conf then changing the
definition in the .h file is the way to go. Otherwise you may have to find the
source for this confusion.
Shuki
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angela Lazaro
Sent: Friday, September 19, 2008 6:00 AM
To: [email protected]
Subject: Help with Table column OID
Hi all!!!
I'm implementing a MIB using net-snmp 5.3.2 and generate the code with mib2c -c
mib2c.iterate.conf.
In that MIB I have a table that have 5 columns, each column has is own OID but
the OIDs from all columns are not in order. The last two doesn't follow the
natural order of the numbers.
What I mean is, my table has the follow aspect:
table1
|
Entry1
|
Index.1
Column.2
Column.3
Column.9
Column.10
When I tried to do a snmpwalk for that table a got an error, user defined
#31... can this error happened because my table doesn't follow the natural
order of the numbers... should it be,
table1
|
Entry1
|
Index.1
Column.2
Column.3
Column.4
Column.5
instead?
I have other tables implemented that the OIDs follow the natural order of the
numbers and I don't have that error... can you please confirm me this?
Thanks in advance,
Ângela
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders