-
Notifications
You must be signed in to change notification settings - Fork 2
MFD:ifXTable:mib2c
The first step is to generate the code. Create a new directory somewhere and run:
|
Notes: Select '2', to change some of the defaults. |
||
|
Notes: We will be implementing set support. |
||
|
Notes: While the ifXTable is related to the ifTable, the two tables do not have any dependencies. |
||
|
Notes: We don't need to track anything at the table level, so we'll just accept the default. |
||
|
Notes: We'll be using the ifTable's access routines to get interface data, so we'll just use the netsnmp_interface_entry structure to keep that data. |
||
|
Notes: The net-snmp access routines will provide us with allocated structures, so we'll just use those instead of copying them to an embeded structure. |
||
|
Notes: We'll be using the net-snmp data access routines to create the netsnmp_interface_entry structures, and those routines will take care of initialization for us. |
||
|
Notes: We are going to keep a cache and refresh it periodically. |
||
|
Notes: We get a copy of the interface data via the netsnmp data access functions. |
||
|
Notes: We saw the example code in the last tutorial, so we'll skip it this time. |
As before, when finished, you should have several files:
- ifXTable.c
- ifXTable_data_access.c
- ifXTable_data_access.h
- ifXTable_data_get.c
- ifXTable_data_get.h
- ifXTable_data_set.c
- ifXTable_data_set.h
- ifXTable_enums.h
- ifXTable.h
- ifXTable_interface.c
- ifXTable_interface.h
- ifXTable_Makefile
- ifXTable_oids.h
- ifXTable-README-FIRST.txt
- ifXTable-README-ifXTable.txt
- ifXTable_subagent.c
You should read ifXTable-README-FIRST.txt for a basic overview of MFD. The basic steps outlined in ifXTable-README-ifXTable.txt were used to write this tutorial.