Difference between revisions of "Template:FAQ:Coding 12"
From Net-SNMP Wiki
m (5.4 release synchronisation) |
m (Latest FAQ revision - preparing for 5.5 release) |
||
| Line 8: | Line 8: | ||
put these two files (<CODE>mymib.[ch]</CODE>) in the directory <CODE>'agent/mibgroup'</CODE>. | put these two files (<CODE>mymib.[ch]</CODE>) in the directory <CODE>'agent/mibgroup'</CODE>. | ||
You should then re-run configure to add in your new module | You should then re-run configure to add in your new module | ||
| − | + | configure --with-mib-modules=mymib | |
| + | and recompile. | ||
If you've got a number of new modules to add, it might be | If you've got a number of new modules to add, it might be | ||
| Line 22: | Line 23: | ||
line given above, would pull in all three modules. See the | line given above, would pull in all three modules. See the | ||
current contents of <CODE>'agent/mibgroup'</CODE> for examples of this. | current contents of <CODE>'agent/mibgroup'</CODE> for examples of this. | ||
| + | Note that the | ||
| + | MfD framework will generate a similar grouping automatically. | ||
Latest revision as of 19:47, 20 July 2009
If you're using the main source tree to compile your new module, then
put these two files (mymib.[ch]) in the directory 'agent/mibgroup'.
You should then re-run configure to add in your new module
configure --with-mib-modules=mymib
and recompile.
If you've got a number of new modules to add, it might be
sensible to put them all into a single subdirectory of 'mibgroup'.
Then create a header file, listing the individual components.
This might look something like:
config_require(mymib/myObjects)
config_require(mymib/myTable)
config_require(mymib/myOtherTable)
If this was saved as the file 'mymib.h', then the same configure
line given above, would pull in all three modules. See the
current contents of 'agent/mibgroup' for examples of this.
Note that the
MfD framework will generate a similar grouping automatically.